Above is the UML for a television object Implement with Java

Above is the UML for a television object. Implement with Java the entire class. Use comments to describe members would do. None of the methods are static. Proper Java method names, parameters and return values are required. No main() or driver is expected.

Solution

class TV
{
//Member variables of class defined in UML diagram
int currentChannel;
boolean On;
int Connected;
boolean HDTV;

//method to get value of getcurrentchannel
public int getCurrentChannel()
{
return currentChannel;
}

//method to set value of currentChannel

public void setCurrentChannel(int currentChannel)
{
this.currentChannel = currentChannel;
}


//method to get value of On attribute of class
public boolean getIsOn()
{
return On;
}

//method to get value of HDTV attribute of class

public boolean getisHDTV()
{
return HDTV;
}

//method to set value of HDTV attribute

public void setisHDTV(boolean HDTV)
{
this.HDTV=HDTV;
}

}

 Above is the UML for a television object. Implement with Java the entire class. Use comments to describe members would do. None of the methods are static. Prop

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site