"I don't know how to relate Starbucks, Remote control and a Television with a certain "pecheng" programming language!" - Iwa moto
public class Main {
public static void main(String[] args) {
shapeClass s = new shapeClass();
System.out.println ("SHAPE MENU");
s.draw();
s.erase();
s.move();
System.out.println ("COLOR"+ s.getColor());
System.out.println ("NAME");
s.getName();
System.out.println ("FINISHED");
}
}
public class shapeClass {
private String name;
private String color;
public void draw(){
System.out.println ("You selected Draw");
}
public void erase(){
System.out.println ("You selected Erase");
}
public void move(){
System.out.println ("You selected Move");
}
public void setName(String Name){
name = Name;
}
public String getName(){
return name;
}
public void setColor (String Color){
color = Color;
}
public String getColor(){
return color;
}
}
No comments:
Post a Comment