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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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