Question: Modify the Tv and Remote classes as follows: a. Make them mutual friends. b. Add a state variable member to the Remote class that describes
Modify the Tv and Remote classes as follows:
a. Make them mutual friends.
b. Add a state variable member to the Remote class that describes whether the remote control is in normal or interactive mode.
c. Add a Remote method that displays the mode.
d. Provide the Tv class with a method for toggling the new Remote member.
This method should work only if the TV is in the on state.
Write a short program that tests these new features.
Step by Step Solution
3.43 Rating (159 Votes )
There are 3 Steps involved in it
The program is as follows i public class RemoteTest ii public static void mainString args iii TV tv ... View full answer
Get step-by-step solutions from verified subject matter experts
