Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CIS2542 - Homework 02 Gorg vs Booy Battle - Part 1 - Meet the Booy The Gorg can no longer be reasoned with! Negotiations cannot
CIS2542 - Homework 02 Gorg vs Booy Battle - Part 1 - Meet the Booy The Gorg can no longer be reasoned with! Negotiations cannot go well if you have no idea what the other side wants! They are so strong and vicious that ignoring them only means Earth is indirectly conquered somehow? It's not my movie plot, but my retelling is totally butchering it for sure. The Booy are friends of all peoples across the galaxy. Or so we are told. These beloved creatures want nothing more than peace and harmony, as long as it is their version of peace and harmony. It turns out okay for everyone in the end I suppose. Maybe you can tell from the descriptions, but the Booy are quite the underdogs here! Captain Smek will need to simulate a Gorg battle many times over to see what their odds of victory would be. For the first part of this simulation, let's create the Boov class. Here are their specifications. Booy Every one of them can have a different name. There is no default name for a Boov. Every individual Booy starts with a health point value in the range (10-15] randomly selected When a Booy gets attacked: o 1/4 of the time randomly, the attack does no damage o 1/4 of the time randomly, the attack does 1 damage o 1/2 of the time randomly, the attack will hit them and do [2-5] random damage Requirements 1) Create a Boov class type Private string member variable for name Private int member variable for health Public constructor which initializes both member variables Public get function for the name Public get function for the health value Public boolean function called IsDefeated() O A Booy is defeated when health
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started