Design-and-implement-your-own-java-class-to-represent-a-household-item-computer-science-help
Design and implement your own class to represent a household item of your choice (toaster, pressure cooker, hair dryer, piano …) Your class should have a constructor, one additional method and at least one member variable (e.g. boolean isOn to turn the item on or off). Be sure you demonstrate your class works properly by constructing an instance of it and calling your method.
Something along this lines….:
// Import statements
import java.util.Scanner;
public class Running {
public static void main(String[] args){
// Use the Scanner class to input data
Scanner scannerIn = new Scanner(System.in);
// Create object using constructor //
Treadmill runner = new Treadmill(“Speedy”);
// declare variables //
String errorMessage=””;
char toRun=’y’;
char turnOn=’y’;
int speed=0;
int runTime=0;
boolean isOn=false;
//End declare variables //
// Begin User Prompts //
System.out.print(“