Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class GoodDog {
- private int size;
- public int getSize() {
- return size;
- }
- public void setSize(int s) {
- size = s;
- }
- void bark() {
- if (size > 60) {
- System.out.println("Woof! Woof!");
- }else if (size > 14) {
- System.out.println("Ruff! Ruff!");
- }else {
- System.out.println("Yip! Yip!");
- }
- }
- }
Add Comment
Please, Sign In to add comment