Monday, 24 September 2012

Televsion Revised Class

public
class Television {
private static String manufacturer = "Sony";
private static int ScreenSize = 40 ;
private static int channel = 1;
private static int volume = 0;
public static String getmanufacturer(){
return manufacturer;
}
public static void setmanufacturer (String Name){
manufacturer = "sony";
}
public static int getScreenSize(){
return ScreenSize;
}
public static void setScreenSize(int size){
ScreenSize = 40;
}
public static int getchannel(){
return channel;
}
public static void setchannel(int channel){
channel = 1;
}
public static int getvolume(){
return volume;
}
public static void setvolume(int volume){
volume = 0;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
setmanufacturer(
"Sony");
setScreenSize(40);
setchannel(1);
setvolume(0);
System.
out.println(getmanufacturer());
System.
out.println(getScreenSize());
System.
out.println(getchannel());
System.
out.println(getvolume());
}
}

No comments:

Post a Comment