Question: Create a class called Appliance that includes four instance variables-type, brand, model number, and price. Write the code according to our Java coding standards-a constructor
Create a class called Appliance that includes four instance variables-type, brand, model number, and price. Write the code according to our Java coding standards-a constructor that initializes the four instance variables, a default constructor, a get/set for each variable, and toString. Write a test case, ApplianceTest, that creates two Appliance objects with the following data. washer, Kenmore, 102956, $299.99 stove, GE, 8956, $575.75 Then, ask the user their name and how many washers were purchased and how many stoves were purchased. This will be repeated for an unknown number of customers. When finished, print the total of each in the format: Customer: nameofcustomerhere 1 X Kenmore washers were purchased for a total of $xxx.xx. X GE stoves were purchased for a total of $xxx.xx. Customer: nameofcustomerhere 2 X Kenmore washers were purchased for a total of $xxx.xx. X GE stoves were purchased for a total of $xxx.xx. The grand total is $xxx.xx Use JOptionPane for input and output. There will be only one output dialog box. Zip Appliance.java, Appliance Test.java, Restaurant.java, and Sales.java into HW1.zip and upload to BB. Do not turn in text files, class files, or rar files. These will not be graded. Follow the coding standards and homework submission rules as defined in those documents
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
