Access over 20 million homework & study documents

search

Additional requirementsPart AAsk the user if they would like g

Content type
User Generated
Rating
Showing Page:
1/8
Additional requirements:
Part A:
Ask the user if they would like granite counter tops in the
condo kitchen.
If so, add an additional $4000 to the grand total.
Part B:
Ask the user if the construction needs to be expedited.
If so, add an additional $2000 to the price. write an
application for the Summerdale Condo Sales office, the
program determines the price of a condominium. Ask the
user to choose i 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
$150000, 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. 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 of any condo with a garage. If the
parking value is invalid, display an appropriate message
and assume that the price is for a condo with no garage.
Save the file as CondoSales2.java.
Solution
Answer A)
import java.util.*;
class Condosales

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/8
{
public static void main (String[] args) throws
java.lang.Exception
{
double price=0;
Scanner scan = new Scanner(System.in);
System.out.println(\"---------Welcome to Summerdale
Condo Sale Office---------\");
System.out.println(\"-------Conddo View List-------\");
System.out.println(\"1. Park View\");
System.out.println(\"2. Golf Course View\");
System.out.println(\"3. Lake View\");
System.out.println(\"Select Your Choice : \");
int choice=scan.nextInt();
if(choice==1)
price+=150000;
else if(choice==2)
price+=170000;
else if(choice==3)
price+=210000;
else
price=0;
System.out.println(\"Would you like granite counter tops
in the condo kitchen(Y/N) : \");
char ch=scan.next().charAt(0);

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/8

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 8 pages?
Access Now
Unformatted Attachment Preview
Additional requirements: Part A: Ask the user if they would like granite counter tops in the condo kitchen. If so, add an additional $4000 to the grand total. Part B: Ask the user if the construction needs to be expedited. If so, add an additional $2000 to the price. write an application for the Summerdale Condo Sales office, the program determines the price of a condominium. Ask the user to choose i 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 $150000, 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. 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 of any condo with a garage. If the parking value is invalid, display an appropriate message and assume that the price is for a condo with no garage. Save the file as CondoSales2.java. Solution Answer A) import java.util.*; class Condosales { public static void main (String[] args) throws java.lang.Exception { double price=0; Scanner scan = new Scanner(System.in); System.out.println(\"---------Welcome to Summerdale Condo Sale Office---------\"); System.out.println(\"-------Conddo View List-------\"); System.out.println(\"1. Park View\"); System.out.println(\"2. Gol ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
I was stuck on this subject and a friend recommended Studypool. I'm so glad I checked it out!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4