American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

10 AM – Intro To Java

November 20, 2021 @ 10:00 am - 11:00 am

Homework
  1. Inside MonsterInheritance project add run() method.
  2. Inside run() method, call initializeMonster() method and then continuously print the following menu
    1. Please select one of the following monsters:
      - Troll - health remaining: 50
      - Dragon - health remaining: 100
      - Water Golem - health remaining: 30
      Enter your selection (Enter 'exit' to quit):
  3. when the user enter “exit” break from the loop.
  4. when the user enter one of the monster species name, display the second menu.
  5. When user select “2. Melle attack”, ask user how much attack point . And then reduce the monster health by calling monster.doDamage(attackPointFromUser).
  6. Please select one of the following monsters:
    - troll - 50 Health remaining
    - water golem - 30 Health remaining
    - dragon - 100 Health remaining
    - Exit
    Enter your selection: troll
    
    What do you want to do with the troll:
    1. Magic attack
    2. Melle attack
    3. Arrow attack
    4. Heal
    Enter your selection: 2
    How much melle attack you want to do to troll: 10
    You attacked the troll and it has 40 healths remaining.
    
    Please select one of the following monsters:
    - troll - 40 Health remaining
    - water golem - 30 Health remaining
    - dragon - 100 Health remaining
    - Exit
    Enter your selection:

Details

Date:
November 20, 2021
Time:
10:00 am - 11:00 am
Verified by MonsterInsights