Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.yahoo.hlctt;
- public class Main {
- public static void main(String[] args) {
- Cat catMurzik = new Cat("Murzik", 4, 3.3, true);
- Cat catChurchill = new Cat("Churchill", 10, 2, false);
- catMurzik.meow();
- catChurchill.meow();
- catMurzik.sleep();
- catChurchill.sleep();
- System.out.println("Happy Birthday, " + catMurzik.getName());
- catMurzik.setAge(catMurzik.getAge() + 1);
- System.out.println(catMurzik.getName() + " now at age " + catMurzik.getAge());
- }
- }
Add Comment
Please, Sign In to add comment