Question: Create an interface called edu.udc.cs2.MachineWashable Add 1 interface method: public int getMaxTemp(); MachineWashable must not extend any other interfaces Finally, create a class called edu.udc.cs2.Cleaners.

Create an interface called edu.udc.cs2.MachineWashable

Add 1 interface method:

public int getMaxTemp();

MachineWashable must not extend any other interfaces

Finally, create a class called edu.udc.cs2.Cleaners. In this class create a void static method called washLaundry that takes a Set of Clothing as the only parameter.

The method must do the following. Iterate the passed-in set of Clothing and output one of 3 statements below for each Clothing element:

If the item is a MachineWashable, output:

itemName is a cold water item.

if the getMaxTemp() is 90 or below where itemName is the value returned by getItemName()

if the max temp is not 90 or below, output:

itemName is a hot water item.

if the item is not MachineWashable, output

itemName is not machine washable.

Be very careful on the spelling and package names as testing your code will rely on the spelling and packages laid forth in this assignment.

Turn in ONLY 2 files:

MachineWashable and Cleaners.java

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!