Write an application for the Summerdale Condo Sales office t
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.
AddaprompttotheCondoSalesapplicationtoasktheusertospecifya(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
import java.util.* // it will include all the header files
public class CondoSales // Define a public class
{
public static void main (String[] args )
{
int choice;
Scanner in = new Scanner(system.in);
System.out.println(\"Press 1 for Park View, Press 2 for Golf Course View, or Press 3 for Lake View. \");
choice = in.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 Selection $0\");
}
}
