Design a class named fan to represent a fan

Assignment Help JAVA Programming
Reference no: EM131587323

Design a class named Fan to represent a fan. The class contains:

Three constants named SLOW, MEDIUM, and FAST with the values 1, 2, and 3 to
denote the fan speed.
A private int data field named speed that specifies the speed of the fan (the
default is SLOW).
A private boolean data field named onOff that specifies whether the fan is on (the
default is false).
A private double data field named radius that specifies the radius of the fan
(the default is 5).
A string data field named color that specifies the color of the fan (the default
is blue).
A no-arg constructor that creates a default fan.
A method named ToString() that outputs a description for the fan. If the fan is on, the method prints the fan speed, color, and radius . If the fan is not on, the method prints the fan color and radius along with the string "fan is off" .
Draw the UML diagram for the class and then implement the class. Write a test program that creates two Fan objects. For the first fan, assign fast speed, radius 10, color yellow, and turn it on. For the second fan, assign medium speed, radius 5, color blue, and turn it off. Invoke the toString methods of each object. Create screenshots of the outputs of the toStringmethods.
Note: Ways to draw UMLs -> Draw.io (Recommended)
Other applications ->UMLet; UML Designer; Applications in Eclipse Marketplace
Homework Submissions & Assessment
Your submission should include:
The java source code file
The UML diagrams
Pseudo code showing the design of the class logic
The screen captures/console output of the toString outputs.

Reference no: EM131587323

Questions Cloud

Discuss affine toric variety : (Veronese variety) Let d be a positive integer and let A be the set of k-partitions of d consisting of all a ? Nk such that |a| = d.
How many life vests must lakeview corporation produce : At the beginning of the year, Lakeview Corporation has 640 life vests in inventory. How many life vests must Lakeview Corporation produce during the year
Describe the speed and endurance of the players : Describe the speed and endurance of the players. Describe the strengths and weaknesses of groundstrokes, serve, return, volley, and overhead.
Despite its promoting technology : Neptune Biometrics, despite its promoting technology, is having difficulty generating profits.
Design a class named fan to represent a fan : Design a class named Fan to represent a fan - A private boolean data field named onOff that specifies whether the fan
How does spoofing threaten an e-commerce : 1. How does spoofing threaten an e-commerce site's operations?
How mobile technology is changing the practice of business : Discuss how mobile technology is changing the practice of business communication. Explain how the widespread use of social media has increased the attention.
What is the after-tax cost of debt : Tiny Tots has debt outstanding, currently selling for $860 per bond. What is the after-tax cost of debt?
What is the total manufacturing cost assigned to job : A company assigns overhead cost to completed jobs on the basis of 111% of direct labor cost. What is the total manufacturing cost assigned to job 313

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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