import java.util.Scanner; /** * DO NOT MODIFY THIS FILE * * This file contains several ADVANCED FEAT

import java.util.Scanner; /** * DO NOT MODIFY THIS FILE * * This file contains several ADVANCED FEATURES that you should ignore * for now. You may discuss the items on this file in the discussion * board and by the end of the course, we can look into the advanced * topics. * * @author donnie * */ /* This is not valid code! */ public class MissedConnectionsA3 { /** * This method displays a pause method and waits until the * user presses the return key. */ public void pause(Scanner scanner) { System.out.println(“— Push to continue —“); scanner.nextLine(); } /** * Generate a random int that can be from 0 to * the number passed in as an argument. */ public int randomNumber(int maxNum) { // ADVANCED FEATURE: Generating a random number /* We add 1 to the number because because without it, it * will return only [maxNum] possible integers, starting * at zero. */ return (int) (Math.random() * (maxNum + 1)); } /** * Simulates a round between the player and the npc, where * the NPC is attacking first. */ public void playRound(int roundNum, NPC npc, Player player) { System.out.println(“[[ ROUND ” + roundNum + ” ]]”); // Determine the attack power from both characters at the // start of the round, this value is used in the message // that's printed to the user and used to change the // character's health points. int randomNpcATK = randomNumber(npc.atk); int randomPlayerATK = randomNumber(player.atk); // Let the NPC attack first System.out.println(npc.name + ” attacks for ” + randomNpcATK + ” points!”); player.hp -= randomNpcATK; System.out.println(player.name + ” has ” + player.hp + “hp left.”); // Then the Player attacks System.out.println(player.name + ” attacks for ” + randomPlayerATK + ” points!”); // LESSON 4 Topic: Selection Statement if (randomPlayerATK