Question 3

a. Write an application for the Summerdale Condo Sales office; the program determines the price of a condominium. Ask the user to choose 1 for park view, 2 for golf course view, or 3 for lake view. The output is the name of the chosen view as well as the price of the condo. Park view condos are $150,000, condos with golf course views are $170,000, and condos with lake views are $210,000. If the user enters an invalid code, set the price to 0. Save the file as CondoSales.java.

Ask the user if they would like granite counter tops in the condo kitchen.

If so, add an additional $4000 to the grand total.

b. Add a prompt to the CondoSales application to ask the user to specify a (1) garage or a (2) parking space, but only if the condo view selection is valid. Add $5,000 to the price fo any condo with a garage. If the parking value is invalid, display an appropriate message and assume that the price for a condo with no garage. Save the file as CondoSales2.java.

Ask the user if the construction needs to be expedited.

If so, add an additional $2000 to the price.

Question 5

Write an application that displays a menu of three items for the Jivin' Java Coffee Shop as follows:

(1) American 1.99
(2) Espresso 2.50
(3) Latte 2.15

Prompt the user to choose an item using the number (1, 2, or 3) that corresponds to the item, or to enter 0 to quit the application. After the user makes the first selection, if the choice is 0, display a total bill of $0. Otherwise, display the menu again. The user should respond to this prompt with another item number to order or 0 to quit. If the user types 0, display the cost of the single requested item. If the user types 1, 2, or 3, add the cost of the second item to the first, and then display the menu a third time. If the user types 0 to quit, display the total cost of the two items; otherwise, display the total for all three selections. Save the file as Coffee.java.

Use a switch statement to determine which menu option the user requested.

Quesiton 6

Barnhill Fastener Company runs a small factory. The company employs workers who are paid one of three hourly rates depending on skill level:

Skill Level Hourly Pay Rate($)
1 17.00
2 20.00
3 22.00

Each factory worker might work any number of hours per week; any hours over 40 are paid at one and one-half times the usual rate.

In addition, workers in skill levels 2 and 3 can elect the following insurance options:

Option Explanation Weekly Cost to Employee ($)
1 Medical insurance 32.50
2 Dental insurance 20.00
3 Long-term disability insurance 10.00

Also, workers in skill level 3 can elect to participate in the retirement plan at 3% of their gross pay.

Write an interactive Java payroll application that calculates the net pay for a factory worker. The program prompts the user for skill level and hours worked, as well as appropriate insurance and retirement options for the employee's skill level category. The application displays: (1) the hours worked, (2) the hourly pay rate, (3) the regular pay for 40 hours, (4) the overtime pay, (5) the total regular and overtime pay, and (6) the total itemized deductions. If the deductions exceed the gross pay, display an error message; otherwise, calculate and display (7) the net pay after all deduction have been subtracted from the gross. Save the file as Pay.java.

Use the Scanner class to prompt the user for their choices.

Use a switch statement to determine the skill level.

Use if...else statements to determine the insurance option.

If the user enters an invalid skill level choice, display an error message.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.