Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Need help with an assignment and it wont compile

Need help with an assignment and it wont compile. Design and implement

your own simple class to represent any household item of your choice (toaster, fan, 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.

package televisiontest;
import java.util.Scanner;
/**
*
* Programmer: Stephen D. Dunn
* Date: 12/3/2016
* Institution: UMUC CMIS141 Introduction to Programming Java
* Program: TelevisionTest Description:
* Evaluation for the Television, its functions and channels.
*
*/

public class TelevisionTest {
public class Television {

//My Fields
public boolean tvIsOn = false;
public int Channel = 8;

//Initial condition
public Television () {
this.tvIsOn = false;
this.Channel = 0;
}
//Parameters
public void Channel(boolean tvIsOn, int Channel) {
this.tvIsOn = tvIsOn;
this.Channel = Channel;
}
//Turning on my TV
public void TvPower () {
this.tvIsOn = true;
}
//Set Channel
public void setChannel (int Channel) {
this.Channel = Channel;
}
//Get Channel
public int getChannel () {
return this.Channel;
}
}
public static void main(String[] args) {

Television Television1 = new Television(System.in);
System.out.println(“Welcome to your Entertainment experience!” );
System.out.println(“Your Television is Currently :” + tvIsOn );
System.out.println(“Your Currently watching Channel: ” + ;

Television Television2 = new Television(true, 2);
System.out.println(“Television Power is: ” + Television.tvIsOn);
System.out.println(“Please Select Channel for Viewing : “);
int Channel = scanner.nextInt();
}
}

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"