001package headfirst.command.remote; 002 003public class TV { 004 String location; 005 int channel; 006 007 public TV(String location) { 008 this.location = location; 009 } 010 011 public void on() { 012 System.out.println("TV is on"); 013 } 014 015 public void off() { 016 System.out.println("TV is off"); 017 } 018 019 public void setInputChannel() { 020 this.channel = 3; 021 System.out.println("Channel is set for VCR"); 022 } 023}