-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDriver.java
More file actions
52 lines (37 loc) · 1.82 KB
/
Driver.java
File metadata and controls
52 lines (37 loc) · 1.82 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// inherits from the pet class
public class Driver extends Pet {
// Defualt Constructor
public Driver(String petType, String petName, int petAge, int dogSpace, int catSpace, int daysStay,
double amountDue) {
super(petType, petName, petAge, dogSpace, catSpace, daysStay, amountDue);
}
public static void main(String[] args) {
System.out.println("Verify the Dogs and Cat information collected from check In");
// create cat object
Pet myCat = new Pet(null, null, 0, 0, 0, 0, 0);
myCat.checkIn();
// create dog object
Pet myDog = new Pet(null, null, 0, 0, 0, 0, 0);
myDog.checkIn();
// verify cat informatin collected
// verify the cats name collected
String printCatName = myCat.getPetName();
System.out.println("Your cat's name is " + printCatName);
// verify the cats age collected
int printCatAge = myCat.getPetAge();
System.out.println(printCatName + " is " + printCatAge + " years old.");
// verify the cats days stayed
int printCatDays = myCat.getDaysStay();
System.out.println(printCatName + " will be staying with us for " + printCatDays + " days.");
// verify dog information collected
// verify the dogs name collected
String printDogName = myDog.getPetName();
System.out.println("Your dogs's name is " + printDogName);
// verify the dogs age collected
int printDogAge = myDog.getPetAge();
System.out.println(printDogName + " is " + printDogAge + " years old.");
// verify the dogs days stayed
int printDogDays = myDog.getDaysStay();
System.out.println(printDogName + " will be staying with us for " + printDogDays + " days.");
}
}