ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 10 Weeks Ago, 6 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 29 May 2017 My Price 8.00

Write an application for the Summerdale Condo Sales office

I am not sure how to do part b. I have completed part a. Can someone help

 

  1. 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.
  2. Add a prompt to the CondoSales application to ask the user to specify a 
    1.       
    2. garage or a      
    3. 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.

 

 

import java.util.Scanner; 

public class CondoSales 

{ 

public static void main(String args []) 

{ 
Scanner scan = new Scanner(System.in); 
System.out.println("Press 1 for Parkview, 2 for Golf Course View, or 3 for Lake View"); 
int choice = scan.nextInt(); 
if(choice == 1) 
System.out.println("Park View: $150,000"); 

else if(choice == 2) 
System.out.println("Golf Course View: $170,000"); 
else if(choice == 3) 
System.out.println("Lake View: $210,000"); 
else 
System.out.println("Invalid Code: $0"); 
} 
}

Answers

(11)
Status NEW Posted 29 May 2017 12:05 AM My Price 8.00

-----------

Not Rated(0)