Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.gmail.kudr641.example1;
- public class Cat {
- private int age;
- private int weight;
- public int getAge() {
- return age;
- }
- public void setAge(int age) {
- this.age = age;
- }
- public int getWeight() {
- return weight;
- }
- public void setWeight(int weight) {
- this.weight = weight;
- }
- public String getColor() {
- return color;
- }
- public void setColor(String color) {
- this.color = color;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- private String color;
- private String name;
- public Cat(int age, int weight, String color, String name){
- this.age = age;
- this.weight = weight;
- this.color = color;
- this.name = name;
- }
- public void getVoice(){
- System.out.println("May - May");
- }
- public void go(){
- System.out.println("Cat go");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement