Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93100271

Have any Question?


Related Questions in Computer Engineering

Hydrogen sulfide h2s a toxic gas redolent of sewage and

Hydrogen sulfide (H2S), a toxic gas redolent of sewage and rotten eggs, is prepared from hydrochloric acid and sodium sulfide by this reaction: 2HCl(aq) + Na2S(aq) → H2S(g) + 2NaCl(aq). Determine the percent yield if 3.7 ...

Algorithms assignment -task -1 design and implement an

Algorithms Assignment - TASK - 1. Design and implement an efficient algorithm for determining the best route between two given stations in a given rail network. 2. The rail network should be passed to your program as an ...

Mary kate is a project manager in the it department for a

Mary Kate is a project manager in the IT department for a university. She has been asked to manage a project to create faculty intranet. The university has multiple campuses in various locations, and professors and other ...

Link changes in unemployment inflation wages and gdp to one

Link changes in unemployment, inflation, wages, and GDP to one another and how they impacted each other during periods of economic decline (recessions) and periods of economic growth (expansion) over the past 10 years.

Short answer essaygiven a requirement to integrate wdas

Short answer essay Given a requirement to integrate WDAs into an Enterprise Intranet, what are 2 applications that would be candidates for that, and illustrate strategies/methodologies to accomplish that.

Question suppose that incoming packets are encrypted with a

Question : Suppose that incoming packets are encrypted with a symmetric key that only the sender and receiver know. Which type(s) of firewall will work with such packets and which will not? Why? Note: Some specific answe ...

Suppose i am designing a personnel database for a

Suppose I am designing a personnel database for a university. The university has three types of personnel: students, staff, and faculty. Here are the characteristics of the three groups: -All three groups have a name and ...

What are the characteristics of perfect competition and

What are the characteristics of perfect competition, and does is exist in the real world?

Titan mining corporation has 75 million shares of common

Titan Mining Corporation has 7.5 million shares of common stock outstanding, 275,000 shares of 4.7 percent preferred stock outstanding, and 160,000 bonds with a semiannual coupon rate of 5.6 percent outstanding, par valu ...

Assume you have been selected to build a system for

Assume you have been selected to build a system for Oil&Gas company. Do you prefer to build a win-based system or a web-based system? Why?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As