American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

10 AM – Intro To Java – Gamas

March 26, 2022 @ 10:00 am - 11:00 am

Today We Do
  1. We added PetSystem the ability to change name.
  2. We created PetCannotDoFetch class.
Homework
  1. I have uploaded all the latest PetSystem java files into Google Drive, please check it out if you did not have a chance to copy code during the class.
  2. If you did not finish last week homework, please finish it.
  3. Change the code inside PetSystem so when you add a pet it will ask whether or not the pet can do fetch, if it cannot then create PetCannotDoFetch class instead of Pet.
  4. Menu
    1. Add pet
    2. List all pets
    3. Find pet by name
    4. Change pet's age
    5. Change pet's name
    6. Play fetch
    7. Exit
    Please make your selection (1-7):1
    
    ENTER NEW PET
    Pet Species: dog
    Pet Name: Stich
    Pet age: 6
    Can this pet play fetch (y/n)? y 
    You have added Stitch as a Pet who can play fetch
    
    Menu
    1. Add pet
    2. List all pets
    3. Find pet by name
    4. Change pet's age
    6. Play fetch
    7. Exit
    Please make your selection (1-7):1
    
    ENTER NEW PET
    Pet Species: turtle
    Pet Name: Slow
    Pet age: 2
    Can this pet play fetch (y/n)? n
    You have added Slow as a Pet who can not play fetch
    
    Menu
    1. Add pet
    2. List all pets
    3. Find pet by name
    4. Change pet's age
    6. Play fetch
    7. Exit
    Please make your selection (1-7):6
    
    PLAY FETCH
    Enter pet's name: Stitch
    Enter object: stick
    Stitch picked up stick and bring it back to you.
    
    Menu
    1. Add pet
    2. List all pets
    3. Find pet by name
    4. Change pet's age
    6. Play fetch
    7. Exit
    Please make your selection (1-7):6
    
    PLAY FETCH
    Enter pet's name: Slow
    Slow is a turtle, it cannot play fetch
    
    

Details

Date:
March 26, 2022
Time:
10:00 am - 11:00 am
Event Categories:
,
Verified by MonsterInsights