Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions