Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package umlaassignment1;
- public class Flag {
- private int height;
- private int weight;
- private String colour;
- public int getHeight() {
- return height;
- }
- public void setHeight(int height) {
- this.height = height;
- }
- public int getWeight() {
- return weight;
- }
- public void setWeight(int weight) {
- this.weight = weight;
- }
- public String getColour() {
- return colour;
- }
- public void setColour(String colour) {
- this.colour = colour;
- }
- public void setData(int height,int weight,String colour)
- {
- this.height=height;
- this.colour=colour;
- this.weight=weight;
- }
- public void display()
- {
- System.out.println(" "+height);
- System.out.println(" "+weight);
- System.out.println(" "+colour);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement