American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6:30 PM – Intro To Java – Darin

July 27 @ 6:30 pm - 7:30 pm

What We Did Today:

  1. Started on the Monster Inheritance project, going over concepts such as inheritance, dictionaries vs lists, design choices for a program.

Homework:

  1. Continue in your monster inheritance project and upload the files to the google drive when you are finished!
  2. hw
    
    implement the play() method so that a player can be initialized, and a monster menu is printed out forever
    for selection.
    
    Within the play method, after selecting the monster, if the monster exists in the system (by checking with the dictionary), print out an attack menu.
    You can copy the attack menu from the following output example:
    
    Sample output:

    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

    PLAY GAME
    What is your name: Darin
    How much health do you want: 100

    Darin has 100 health remaining.
    Please select one of the following monsters:
    – Regenerative Troll – 70 health
    – Troll – 70 health
    – Dragon – 100 health
    – Water Golem – 50 health
    Enter your selection (Enter ‘stop’ to end the game): ha
    We can not find this monster in our system: ha

    Darin has 100 health remaining.
    Please select one of the following monsters:
    – Regenerative Troll – 70 health
    – Troll – 70 health
    – Dragon – 100 health
    – Water Golem – 50 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:

You don’t need to implement the attacks just yet. Just make it so that a menu is printed out and you can enter a selection if a monster is correctly selected.

Notes:

You can email me at ddjapri@ayclogic.com if you have any questions!

Details

Date:
July 27
Time:
6:30 pm - 7:30 pm
Event Categories:
,
Verified by MonsterInsights