« All Events
3 PM – Intro To Java – Gamas
March 26, 2022 @ 3:00 am - 4:00 pm
Today We Do
- We learn how to fix Java error.
- Added find pet by name.
Homework
- Add 2 more features in PetSystem. Change pet name and Change pet age.
- To do this you have to first find the pet that you want to change. And then use the Pet’s setters to change the pet name and age.
- Look at below
Menu
1. Add pet
2. List all pets
3. Find pet by name
4. Change pet's age
5. Change pet's name
99. Exit
Please make your selection (1-5):1
ENTER NEW PET
Pet Species: Dog
Pet Name: Stitch
Pet age: 6
Menu
1. Add pet
2. List all pets
3. Find pet by name
4. Change pet's age
5. Change pet's name
99. Exit
Please make your selection (1-6):2
Stitch - Dog - 6
Menu
1. Add pet
2. List all pets
3. Find pet by name
4. Change pet's age
5. Change pet's name
6. Exit
Please make your selection (1-4):5
CHANGE PET NAME
Enter the pet's name that you want to find: Stitch
Give me a new name: Atlas
You changed Stitch to Atlas
Menu
1. Add pet
2. List all pets
3. Find pet by name
4. Change pet's age
5. Change pet's name
6. Exit
Please make your selection (1-4):2
Atlas - Dog - 6