Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What I have done... Create a class called Appliance that includes four instance variables-type, brand, model number, and price. Write the code according to our

image text in transcribed

What I have done...

image text in transcribedimage text in transcribed

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. (sentinel while loop) Enter blah blah to quit...When finished, print the total of each in the format: Customer: nameofcustomerhere1 X Kenmore washers were purchased for a total of $XXXX X GE stoves were purchased for a total of $XXX.x Customer: nameofcustomerhere2 X Kenmore washers were purchased for a total of $xxx.xx X GE stoves were purchased for a total of Sxxx.xx The grand total is $xxx.xx Use JOptionPane for input and output. There will be only one output dialog box

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions