Question: JAVA l develop three classes called OnlineStore, Product, and Order to keep product information and order information of a tiny online shopping mall. the OnlineStore

JAVA

l develop three classes called OnlineStore, Product, and Order to keep product information and order information of a tiny online shopping mall.

JAVA l develop three classes called OnlineStore, Product, and Order to keep

the OnlineStore class can have maximum ten products and ten orders

product information and order information of a tiny online shopping mall. the

OnlineStore class can have maximum ten products and ten orders DemoClass import

DemoClass

import java.util.Scanner;

public class OnlineStoreDemo

{

public static void main(String[] args)

{

Scanner sc = new Scanner (System.in);

OnlineStore csumbOnlineStore = new OnlineStore("CSUMB");

int option;

System.out.println("Welcome to CSUMB OnlineStore");

do

{

System.out.println("Select your choice:");

System.out.println(" 1. Add Product");

System.out.println(" 2. Product Info");

System.out.println(" 3. Make Order");

System.out.println(" 4. Exit");

option = sc.nextInt();

if (option == 1)

{

csumbOnlineStore.addProduct();

}

else if (option == 2)

{

csumbOnlineStore.productInfo();

}

else if (option == 3)

{

csumbOnlineStore.makeOrder();

}

else if (option == 4)

{

System.out.println("Bye"); return;

}

else

{

System.out.println("Incorrect option");

}

System.out.println(" "); } while (true);

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!