Write a test program that creates two fan objects

Assignment Help Computer Engineering
Reference no: EM132112803

PYTHON CODE PLEASE

• Three static constants named SLOW, MEDIUM, and FAST with the values 1, 2, and 3 to denote the fan speeds.

• A private int data filed named "speed" that specifies the speed of the fan, default to slow.

• A private Boolean data field named "on" that specifies whether the fan is on, default to false.

• A private double data field named "radius" that specifies the radius of the fan, default to 5.

• A private string data field named "color" that specifies the color of the fan, default to "blue".

• A properties for all 4 data fields.

• A no-argument constructor that creates a default fan.use this ref.

• A one-argument constructor that creates fan. provide speed value.

• A two-argument constructor that creates fan. provide speed and on value.

• A three-argument constructor that creates fan. provide speed , on , and radius value

• A four-argument constructor that creates fan. provide speed , on , radius , and color value.

• A DisplayFan( ) method that returns a string description for the fan. If the fan is on, the method returns the fan speed, color, and radius in one combined string. If the fan is off, the method returns the fan color and radius along with the string, "fan is off" in one combined string.

The Fan Application class

• Write a test program that creates two Fan objects.

• Fan Object 1 inputs:

o Assign Fastest Speed.

o Assign a radius 10

o Assign the color yellow

o Turn the fan on.

• Fan Object 2 inputs:

o Assign Medium Speed.

o Assign a radius 5

o Assign the color blue

o Turn the fan off.

Reference no: EM132112803

Questions Cloud

Element of the 8p of marketing : Consider the 8 Ps of marketing (strategies). Describe a situation where each element of the 8Ps of marketing could be modified (if only a little) when marketed
Write a function that takes as input the cost of the item : Write a function that takes as input the cost of the item that you are purchasing and a Boolean variable indicating.
Current and future state of the management : BN305 - Virtual Private Network - Describe architectural VPN design for small, medium and large businesses and corporations
Calculate the amount of money a person would earn : Write a program that calculates the amount of money a person would earn over a period of time if their salary is one penny the first day, two pennies.
Write a test program that creates two fan objects : Write a test program that creates two Fan objects. A one-argument constructor that creates fan. provide speed value.
Write two versions of a factorial function : You need to write a few functions in Python. Write two versions of a factorial function.
Create a python program that takes as a cipher-text : Write a python program that takes as a cipher-text, decrypts the cipher-text as described above and returns the message.
Write a program that plays the tic-tac-toe game : Write a program that plays the tic-tac-toe game. Two players take turns clicking an available cell in a 3 x 3 grid with their respective tokens .
Prevent loss of revenue due to used product markets : Suppose that in order to prevent loss of revenue due to used product markets, smart phone providers successfully lobby the government to make it illegal to buy

Reviews

Write a Review

Computer Engineering Questions & Answers

  Plan a program that asks for the student''s name

Your English instructor, realizing you are a programmer, asks you to write down a Grade Book program for his class to help him compute final grades. plan a program that asks for the student's name and four test grades. Display the student's name, ..

  The difference between a rectangular array and a polar array

What is the difference between a rectangular array and a polar array. What inputs are required to execute each command in AutoCAD

  Describe what productivity metrics you analyze to drive

The best Field Account Executives are incredibly metrics focused and manage their time wisely. Please describe what productivity metrics you analyze to drive.

  Discuss how employers can justify the use of tools

Privacy goes hand in hand with security, but many of the activities of information security analysts seem to be an invasion of privacy.

  What is ethical and what is unethical how was this

write about a situation in about 2 pages where you have been in a leadership postion at your workplace and have been

  Create and initialise the main program objects

CP1300 SP51 2015 Assignment Details -create and initialise the main program objects, and to control program behaviour and

  Recall extensive change that have witnessed

Try to generalize your observations so they can serve as a guideline for similar cases.

  Network in a gsm system

Consider two mobiles belonging to the same home network in a GSM system. Explain step by step the process in GSM roaming, when one mobile wakes up in a foreign network and makes a call to the other.

  Explore how video games are being used by medical community

For this writing assignment, you will explore how video games are being used by the medical community. Video games (both online and apps) are a source of entertainment for individuals and groups of people.

  Discuss regulatory issues surrounding the area

You may use resources from the APUS Online Library, any library, government library, or any peer-reviewed reference

  Determine the minimum value of the processing gain

[DS Spread Spectrum System Design] A DS spread spectrum signal is to be designed such that the power ratio at the intended receiver is PRIPN = 0.01.

  Write the boolean function as boolean algebra

Write the Boolean function as Boolean algebra terms. First, think about how to deal with the two outputs. Then, describe each single row in terms of Boolean algebra

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd