How can i get the underlined and bolded line to say power is on.
How can i get the underlined and bolded line to say power is on. Tried
replacing it but keeps giving me errors or something i never seen before. Please explain what happened im lost.
public class Television {
public boolean tvIsOn = false;
public int Channel = 8;
public Television() {
this.tvIsOn = false;
this.Channel = 0;
}
//Parameters
public void Channel(boolean tvIsOn, int Channel) {
this.tvIsOn = tvIsOn;
this.Channel = Channel;
}
//Turning on
public void TvPower() {
this.tvIsOn = true;
}
//Set
public void setChannel(int Channel) {
this.Channel = Channel;
}
//Get
public int getChannel() {
return this.Channel;
}
//Method
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
//Input // Output//
Television Television1 = new Television();
System.out.println(“Welcome to your New TV experience!”);
System.out.println(“Your TV is Currently :” + (Television1.tvIsOn ? “On” : “Off”));
System.out.println(“Your watching Channel: ” + Television1.getChannel());
System.out.println();
Television Television2 = new Television();
Television2.Channel(true, 2);
System.out.println(“Power is: ” + Television2.tvIsOn);
System.out.print(“Please select your Channel : “);
Television2.Channel = scanner.nextInt();
System.out.println();
System.out.println(“Your TV is Currently :” + (Television2.tvIsOn ? “On” : “Off”));
System.out.println(“Your watching Channel: ” + Television2.getChannel());
System.out.println();