Computer Science, asked by Anonymous, 7 months ago

Mega Shop has different floors which display varieties of dresses as mentioned below:

1. Ground floor Kids Wear

2. First floor : Ladies Wear

3. Second floor Designer Sarees

4. Third Floor: Men's Wear

The user should enter the floor number to get the information regarding different items of the Mega shop. After shopping, the shopkeeper inputs the item purchased and cost of the item and prints a bill to be paid by the customer in the given format:
Name of the Shop: City Mart

Total Amount:_________

Visit Again!!!

WAP in java to perform the above task as per user's choice

Answers

Answered by DüllStâr
75

★Required \: program★

important java .util.*;

public class Something;

{

public static void main (String []args)

{

Scanner sc=new Scanner (System.in);

int ch,price;

System.out.println("Enter 1 for Ground floor: Kids Wear");

System.out.println("Enter 2 for First floor : Ladies Wear");

System.out.println("Enter 3 for Second floor: Designer Sarees");

System.out.println("Enter 4 for Third floor : Men's Wear");

System.out.print("Enter your choice: ");

ch=sc.nextint();

switch(ch)

{

case 1:

System.out.println("Kids Wear");

System.out.print("Enter the price: ");

price=sc.nextInt();

System.out.println("Name of the Shop: City Mart");

System.out.println("Total amount : "+price); System.out.println("Visit Again!!!");

break;

case 2:

System.out.println("Ladies Wear");

System.out.print("Enter the price: ");

price=sc.nextInt();

System.out.println("Name of the Shop: City Mart");

System.out.println("Total amount : "+price); System.out.println("Visit Again!!!");

break;

case 3:

System.out.println("Designer Sarees");

System.out.print("Enter the price: ");

price=sc.nextInt();

System.out.println("Name of the Shop: City Mart");

System.out.println("Total amount : "+price); System.out.println("Visit Again!!!");

break;

case 4:

System.out.println("Men's Wear");

System.out.print("Enter the price: ");

price=sc.nextInt();

System.out.println("Name of the Shop: City Mart");

System.out.println("Total amount : "+price); System.out.println("Visit Again!!!");

break;

default:

System.out.println("Invalid Choice");

}

}

}

★Input:★

Enter your choice:

1

Enter the price:

₹98000

★output:★

Attached picture↑

★Details \: about \: program★

  1. Language used : Java
  2. Package include

_______________________________

With regards!

★Dull Star★

Attachments:
Answered by B612AQ
15

important java .util.*;

public class Something;

{

public static void main (String []args)

{

Scanner sc=new Scanner (System.in);

int ch,price;

System.out.println("Enter 1 for Ground floor: Kids Wear");

System.out.println("Enter 2 for First floor : Ladies Wear");

System.out.println("Enter 3 for Second floor: Designer Sarees");

System.out.println("Enter 4 for Third floor : Men's Wear");

System.out.print("Enter your choice: ");

ch=sc.nextint();

switch(ch)

{

case 1:

System.out.println("Kids Wear");

System.out.print("Enter the price: ");

price=sc.nextInt();

System.out.println("Name of the Shop: City Mart");

System.out.println("Total amount : "+price); System.out.println("Visit Again!!!");

break;

case 2:

System.out.println("Ladies Wear");

System.out.print("Enter the price: ");

price=sc.nextInt();

System.out.println("Name of the Shop: City Mart");

System.out.println("Total amount : "+price); System.out.println("Visit Again!!!");

break;

case 3:

System.out.println("Designer Sarees");

System.out.print("Enter the price: ");

price=sc.nextInt();

System.out.println("Name of the Shop: City Mart");

System.out.println("Total amount : "+price); System.out.println("Visit Again!!!");

break;

case 4:

System.out.println("Men's Wear");

System.out.print("Enter the price: ");

price=sc.nextInt();

System.out.println("Name of the Shop: City Mart");

System.out.println("Total amount : "+price); System.out.println("Visit Again!!!");

break;

default:

System.out.println("Invalid Choice");

}

}

}

★Input:★★Input:★

Enter your choice:

1

Enter the price:

₹98000

★output:★★output:★

Attached picture↑

★Details \: about \: program★★Detailsaboutprogram★

Language used : Java

Package include

_______________________________

With regards!

Similar questions