-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathAnimalNoises.java
More file actions
32 lines (25 loc) · 859 Bytes
/
AnimalNoises.java
File metadata and controls
32 lines (25 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* @author Trevor Parrish - tparrish2
* CIS175 - Spring 2023
* Jan 17, 2023
*/
import model.Platypus;
import model.Dog;
import model.Cat;
import model.GuineaPig;
public class AnimalNoises {
// add your animal class to the model package
// only push this file and the animal class you created
public static void main(String[] args) {
Platypus frank = new Platypus();
System.out.println(frank.makeNoise());
Dog Titan = new Dog();
System.out.println(Titan.makeNoise());
Cat jordan = new Cat("Jordan",6,true);
System.out.println(jordan.getName() + " Age: " + jordan.getAge() + " Is Loved: " + jordan.getIsLoved());
System.out.println(jordan.getName() + ": " + jordan.speak());
// create GuineaPig object and print results of makeNoise method
GuineaPig daisy = new GuineaPig();
System.out.println(daisy.makeNoise());
}
}