Question: Create a Java program for a point - of - sale self - service station in an electronics store.Prompt the user to choose between desktop,
Create a Java program for a pointofsale selfservice station in an electronics store.Prompt the user to choose between desktop, laptop, or printer.If "desktop" is chosen, ask for the highest price they're willing to pay. Display available desktop computers' details.If "laptop" is chosen, ask for the largest and smallest screen sizes they'll consider. Display available laptops' details.If "printer" is chosen, ask if they want blackandwhite or color. Display available printers' details.Number the results and prompt the user if they want to purchase any item by typing its number. Add chosen items to a cart.Ask if they want to search for another item. Repeat the process if yes. If no and items are in the cart, ask if they want to check out.During checkout, display total items and cost, increment order number, insert records into Orders table, and decrease item inventory.Assume a cashier is present; record your first name as the cashier.After recording the order, thank the customer for their business, and restart the process for the next customer.Allow a sentinel value to exit the program.Ensure the code follows the MVC design pattern. You can use the provided SQL file to create a local copy of the computers database in SQLite for development and testing.
CREATE TABLE Product maker CHAR model INT, prodType VARCHAR price INT, inventory INT, PRIMARY KEY model CHECK prodType IN PC 'laptop', 'printer';CREATE TABLE PC model INT, speed FLOAT, ram INT, hd INT, PRIMARY KEY model FOREIGN KEY model REFERENCES Productmodel ON DELETE CASCADE ON UPDATE CASCADE;
CREATE TABLE Laptop model INT, speed FLOAT, ram INT, hd INT, screen FLOAT, PRIMARY KEY model FOREIGN KEY model REFERENCES Productmodel ON DELETE CASCADE ON UPDATE CASCADE;
CREATE TABLE Printer model INT, color BIT NOT NULL, printerType VARCHAR PRIMARY KEY model FOREIGN KEY model REFERENCES Productmodel ON DELETE CASCADE ON UPDATE CASCADE, CHECK printerType IN laser 'inkjet';CREATE TABLE Orders orderNumberint, model int, priceint, cashiervarchar PRIMARY KEY orderNumber model FOREIGN KEY model REFERENCES Productmodel ON DELETE CASCADE ON UPDATE CASCADE; Insert the sample data from the textbookINSERT INTO Product VALUES APC;INSERT INTO Product VALUES APC;INSERT INTO Product VALUES APC;INSERT INTO Product VALUES A 'laptop', ;INSERT INTO Product VALUES A 'laptop', ;INSERT INTO Product VALUES A 'laptop', ;INSERT INTO Product VALUES BPC;INSERT INTO Product VALUES BPC;INSERT INTO Product VALUES BPC;INSERT INTO Product VALUES B 'laptop', ;INSERT INTO Product VALUES CPC;INSERT INTO Product VALUES DPC;INSERT INTO Product VALUES DPC;INSERT INTO Product VALUES DPC;INSERT INTO Product VALUES D 'printer', ;INSERT INTO Product VALUES D 'printer', ;INSERT INTO Product VALUES EPC;INSERT INTO Product VALUES EPC;INSERT INTO Product VALUES EPC;INSERT INTO Product VALUES E 'laptop', ;INSERT INTO Product VALUES E 'laptop', ;INSERT INTO Product VALUES E 'laptop', ;INSERT INTO Product VALUES E 'printer', ;INSERT INTO Product VALUES E 'printer', ;INSERT INTO Product VALUES E 'printer', ;INSERT INTO Product VALUES F 'laptop', ;INSERT INTO Product VALUES F 'laptop', ;INSERT INTO Product VALUES G 'laptop', ;INSERT INTO Product VALUES H 'printer', ;INSERT INTO Product VALUES H 'printer', ;INSERT INTO PC VALUES ;INSERT INTO PC VALUES ;INSERT INTO PC VALUES ;INSERT INTO PC VALUES ;INSERT INTO PC VALUES ;INSERT INTO PC VALUES ;INSERT INTO PC VALUES ;INSERT INTO PC VALUES ;INSERT INTO PC VALUES ;INSERT INTO PC VALUES ;INSERT INTO PC VALUES ;INSERT INTO PC VALUES ;INSERT INTO PC VALUES ;INSERT INTO Laptop VALUES ;INSERT INTO Laptop VALUES ;INSERT INTO Laptop VALUES ;
INSERT INTO Laptop VALUES ;INSERT INTO Laptop VALUES ;INSERT INTO Laptop VALUES ;
INSERT INTO Laptop VALUES ;INSERT INTO Laptop VALUES ;INSERT INTO Laptop VALUES ;INSERT INTO Laptop VALUES ;I
NSERT INTO Printer VALUES 'inkjet';INSERT INTO Printer VALUES 'laser';INSERT INTO Printer VALUES 'laser';INSERT INTO Printer VALUES 'inkjet';INSERT INTO Printer VALUES 'laser';INSERT INTO Printer VALUES 'inkjet';
INSERT INTO Printer VALUES 'laser';
Separate this into each individual class that these need to be in
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
