Page 1 of 1

Exercise 1: An Electronics Shop wants to keep track of its inventory. It needs to save information about each item it ha

Posted: Wed Apr 27, 2022 3:31 pm
by answerhappygod
Exercise 1 An Electronics Shop Wants To Keep Track Of Its Inventory It Needs To Save Information About Each Item It Ha 1
Exercise 1 An Electronics Shop Wants To Keep Track Of Its Inventory It Needs To Save Information About Each Item It Ha 1 (283.14 KiB) Viewed 42 times
Exercise 1: An Electronics Shop wants to keep track of its inventory. It needs to save information about each item it has. For each item, it needs to know its name, minUserAge, hasBatteries, and price. 1. Create a Java class “eltem” that has the following attributes: name (String), minUserAge (int), hasBatteries(boolean) and price (double). Give all attributes a private visibility. 2. Write two constructors for the class eltem: one without parameters, and another with parameters to fill all its attributes. 3. Create an accessor and a mutator method for each attribute. Make all methods public. 4. Create a “toString()" method to display the attributes of the class “eltem”. Using GUI: n х Electronics Shop 1. Under the same package, create a JFrame Form and | call it “eItem” that has labels, It should looks like this: Note: The Combo Box has the following options: Item Name . Min User Age: 0 O Has Batteries Price (AED) ADD . Items List: O 0 3 5 7 9 11 13 O