Question: Answer Part 3) I have posted this question multiple times. Here is the base code and what I have so far This is what it
Answer Part 3) I have posted this question multiple times.
Here is the base code and what I have so far
This is what it should do and look like: https://www.screencast.com/t/Z6NU0nXd




Base code:
![store public void printstock) for(int i ; 1 curProducts; i++) System.out.println(tckli] "stock](https://s3.amazonaws.com/si.experts.images/answers/2024/08/66cebfdc6bea9_56366cebfdbe2064.jpg)
![[i].getQuantity) in stock,stock).getPricedollars each)) public static Electronicstore createStore) Electronicstore storel new Electronicstore(](https://s3.amazonaws.com/si.experts.images/answers/2024/08/66cebfdd31e14_56466cebfdc9b0e7.jpg)







What I have so far



![i++) System.out.println(tckli] "stock [i].getQuantity) in stock,stock).getPricedollars each)) public static Electronicstore createStore) Electronicstore](https://s3.amazonaws.com/si.experts.images/answers/2024/08/66cebfe4dfc7a_57266cebfe4531df.jpg)

public double getRevenue) return revenue: //Prints the stock of the store public void printstock) for(int i ; 1 curProducts; i++) System.out.println(tckli] "stock [i].getQuantity) in stock,stock).getPricedollars each)) public static Electronicstore createStore) Electronicstore storel new Electronicstore( initName: "Watts Up Electronics") Desktop d1 new Desktop(100, 10, 3.0, 16, false, 250, "Compact") Desktop d2 new Desktop(200, 10, 4.0, 32, true, 500, "Server"); Laptop 11 new Laptop 150, 1, 2.5. 16, true, 250, 15): Laptop 12 new Laptop(250, 10, 3.5, 24, true, 500, 16): Fridge f1new Fridge(500, 10, 250, "White", "Sub Zero", 15.5, false): Fridge 12new Fridge(750, 10, 125, "Stainless Steel", "Sub Zero", 23, true): ToasterOven t1 new ToasterOven(25, 10, 50, "Black" "Danby", 8, false); ToasterOven t2 new ToasterOven(75, 10, 50, "silver", "Toasty", 12, true) storel.addProduct(dl); storel.addProduct(d2): storel.addProduct (1); storel.addProduct (12); storel.addProduct (f1); storel.addProduct (12); storel.addProduct(tl); storel.addProduct (t2); return storel; public double getRevenue) return revenue: //Prints the stock of the store public void printstock) for(int i ; 1 curProducts; i++) System.out.println(tckli] "stock [i].getQuantity) in stock,stock).getPricedollars each)) public static Electronicstore createStore) Electronicstore storel new Electronicstore( initName: "Watts Up Electronics") Desktop d1 new Desktop(100, 10, 3.0, 16, false, 250, "Compact") Desktop d2 new Desktop(200, 10, 4.0, 32, true, 500, "Server"); Laptop 11 new Laptop 150, 1, 2.5. 16, true, 250, 15): Laptop 12 new Laptop(250, 10, 3.5, 24, true, 500, 16): Fridge f1new Fridge(500, 10, 250, "White", "Sub Zero", 15.5, false): Fridge 12new Fridge(750, 10, 125, "Stainless Steel", "Sub Zero", 23, true): ToasterOven t1 new ToasterOven(25, 10, 50, "Black" "Danby", 8, false); ToasterOven t2 new ToasterOven(75, 10, 50, "silver", "Toasty", 12, true) storel.addProduct(dl); storel.addProduct(d2): storel.addProduct (1); storel.addProduct (12); storel.addProduct (f1); storel.addProduct (12); storel.addProduct(tl); storel.addProduct (t2); return storel
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
