Questions from Starting Out With Java


Q: Create an application named Percentages whose main() method holds two double

Create an application named Percentages whose main() method holds two double variables, and prompt the user for values. Pass both variables to a method named computePercent() that displays the two val...

See Answer

Q: To encourage good grades, Hermosa High School has decided to award

To encourage good grades, Hermosa High School has decided to award each student a bookstore credit that is 10 times the student’s grade point average. In other words, a student with a 3.2 grade point...

See Answer

Q: Name at least three attributes that might be appropriate for each of

Name at least three attributes that might be appropriate for each of the following classes: a. RealEstateListing b. Vacation c. CreditCardBill

See Answer

Q: There are 12 inches in a foot and 3 feet in a

There are 12 inches in a foot and 3 feet in a yard. Create a class named InchConversion. Its main() method accepts a value in inches from a user at the keyboard and then passes the entered value to tw...

See Answer

Q: Assume that a gallon of paint covers about 350 square feet of

Assume that a gallon of paint covers about 350 square feet of wall space. Create an application with a main() method that prompts the user for the length, width, and height of a rectangular room. Pass...

See Answer

Q: The Harrison Group Life Insurance company computes annual policy premiums based on

The Harrison Group Life Insurance company computes annual policy premiums based on the age the customer turns in the current calendar year. The premium is computed by taking the decade of the customer...

See Answer

Q: The Renew Your Home Company estimates each job cost as the cost

The Renew Your Home Company estimates each job cost as the cost of materials plus $35 per hour while on the job, plus $12 per hour for travel time to the job site. Create a class that contains a main(...

See Answer

Q: Create a class named Sandwich. Data fields include a String for

Create a class named Sandwich. Data fields include a String for the main ingredient (such as tuna), a String for bread type (such as wheat), and a double for price (such as 4.99). Include methods to g...

See Answer

Q: Create a class named Person that holds two String objects for the

Create a class named Person that holds two String objects for the person’s first and last name. Include a constructor that requires an argument for each field. Include get methods for each field. Sav...

See Answer

Q: Create a class named Lease with fields that hold an apartment tenant’s

Create a class named Lease with fields that hold an apartment tenant’s name, apartment number, monthly rent amount, and term of the lease in months. Include a default constructor that initializes the...

See Answer