Question: JAVA JAVA Exercise #5: An Electronics shop wants to keep track of its inventory. It needs to save information about eachitem it has. For each

JAVA

JAVA JAVA Exercise \#5: An Electronics shop wants to keep track ofJAVAits inventory. It needs to save information about eachitem it has. For

Exercise \#5: An Electronics shop wants to keep track of its inventory. It needs to save information about eachitem it has. For each item, it needs to know its name, minUserAge, hasBatteries, and price. 1. Create a Java class "EItem" that has the following attributes: name (String), minUserAge(int), hasBatteries(boolean) and price (double). Give all attributes a private visibility. 2. Write one constructor 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 "EItem". Under the same package, create a new JFrame Form that has labels, It shouldlooks like this: Note: The Combo Box has the following options: - 0 - 3 - 5 - 7 - 9 - 11 - 13 When presses the button "Add", the information in Item Name, Min User Age, Has Batteries, and Price should be read, and an object of type "EItem" is created andinitialized with the read information. Then a string representing this object is added tothe text area. Note: If another item is added, it should be added afterthe existing list of items. From the previous exercise, add a new boolean method "isForKids" in class "EItem" that return true if the minUserAge

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!