[Solved] SOLVED: pokemon.java + pokemontester.java

$25

File Name: SOLVED:_pokemon.java_+_pokemontester.java.zip
File Size: 386.22 KB

SKU: [Solved] SOLVED: pokemon.java + pokemontester.java Category: Tag:
5/5 - (1 vote)

You are a programmer for Nintendo and you come into the office Monday morning and the following email memo is in your inbox, from an Executive VP: Hey! I was playing racquetball at the club this morning and my raquetball partner said that his cousins sister-in-laws nanny told him that Java is super awesome and I think that rewriting the underlying code for our next Pokemon game will allow us to progressively administrate multimedia based human capital(1)!!!!! Never mind that the language its currently written in is just fine rewrite it. Its going to be SUPER AWESOME!!! Cheers, Your Boss Boss Boss You know the following: A) Play happens in turns, so you are going to need to write a Game class B) Each game has 2 Pokemon, and each turn they can either attack or defend, resulting in 3 possible scenarios: Attack vs. Attack No one is defending here, so each attacking Pokemon has as percent chance of landing the attack that is equal to its speed Attack vs. Defend In the event of attack vs. defend: A) 50% of the time, the defending Pokemon is not hurt and the attacking Pokemon is not hurt B) 25% of the time, the attacking Pokemon lands its hit on the defending Pokemon at 25% of power c) 25% of the time, the attacking Pokemon hurts itself at 25% of power Defend vs. Defend Nothing happens C) Well need a mechanism for human interaction with the players Pokemon (assume 2 human players) D) Well need a mechanism for output to the screen and input from the keyboard. After each turn, the TUI should inform the players of exactly what happened during that turn (best accomplished by having the Pokemon classes and the Game class pass strings to the TUI, which then prints them to the screen) E) Each Pokemons initial stats should be set randomly in the constructor to be within the range specified by the stubbed implementation below. The Pokemon with the higher speed stat attacks first 80% of the time, and the Pokemon with the lower speed stat attacks first 20% of the time. F) Remember that ALL input/output should happen in the TUI!!! Youll be graded on your code, your testing, the presence and validity of your documentation (remember preconditions, postconditions, and invariants?), and whether the program compiles and works properly. Pay careful attention to what is your user interface and what is your model there should be absolutely no input or output in your model! ******************************************************************************************************************************* public class Pokemon { private int health; private int strength; private int speed; public Pokemon(int health, int strength, int speed){ assert health = 1; assert health <= 300; assert strength = 1; assert strength <= 300; assert speed = 1; xxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] SOLVED: pokemon.java + pokemontester.java
$25