Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please write down the methods, pretend get and set functions are already made and so on. variables are String color, String speed( none, slow, medium

please write down the methods, pretend get and set functions are already made and so on.

variables are String color, String speed( none, slow, medium or fast), boolean on, double radius.

A method called turnON which will turn the fan on if it is not already on. It has no parameters and sets the speed of the fan to SLOW. if the fan is already turned on, dont change the speed to slow.

A method called faster. This changes the speed of the fan and has no parameters. If the fan is already at FAST it does not change; otherwise it speeds the fan up one speed (e.g., from SLOW to MEDIUM).

A method called slower. This changes the speed of the fan (has no parameters). If the fan is already at SLOW it does not change; otherwise it slows down the fan by one speed (e.g., from FAST to MEDIUM)

A method called turnOff that turns the fan off if it is on (has no parameters). It sets the speed of the fan to NONE.

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

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago