American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

9 AM – Intro To Java – Gamas

June 25, 2022 @ 9:00 am - 10:00 am

Today We Do
  1. We continued with MonsterInheritance project.
  2. We added player’s health and player’s name as MonsterInheritance class attributes.
  3. We reuse listAllMonsters() method to display the list of monster after user play the game.
Announcement

There is no class on July 2nd because of July 4 weekend. Please look at this page for list of observed holidays for my school: https://indo.ayclogic.com/observed-holidays/ class will resume on July 9th.

Homework

After user play the game (“3”) and enter a monster species, your program need to do the following:

  1. If user enter a monster species that is NOT in the monsterMap, print “We can not find this monster in our system: <monster name>.”
  2. If user enter “stop”, you need to stop the loop and display the previous menu.
  3. If user enter a monster species that is exists in the monsterMap, then you need to print the next menu.
  4. Look at below expected result.
  5. Please select from one of the following
    1. Add new monster
    2. List all monsters
    3. Play the game
    Enter your selection (enter "exit" to quit):3
    
    What is your name: Gamas
    How much health you want: 100
    
    Gamas has 100 health remaining.
    Please select one of the following monsters:
    - troll - 50 health
    - dragon - 100 health
    - Water Golem - 30 health
    Enter your selection (Enter 'stop' to end the game): asdfadsf
    We can not find this monster in our system: asdfadsf.
    
    Gamas has 100 health remaining.
    Please select one of the following monsters:
    - troll - 50 health
    - dragon - 100 health
    - Water Golem - 30 health
    Enter your selection (Enter 'stop' to end the game): stop
    
    Please select from one of the following
    1. Add new monster
    2. List all monsters
    3. Play the game
    Enter your selection (enter "exit" to quit):3
    
    What is your name: Gamas
    How much health you want: 100
    
    Gamas has 100 health remaining.
    Please select one of the following monsters:
    - troll - 50 health
    - dragon - 100 health
    - Water Golem - 30 health
    Enter your selection (Enter 'stop' to end the game): troll
    
    What do you want to do with the troll:
    1. Magic attack
    2. Melee attack
    3. Arrow attack (5 -10 damage)
    4. Heal
    Enter your selection:

Details

Date:
June 25, 2022
Time:
9:00 am - 10:00 am
Event Categories:
,
Verified by MonsterInsights