Death Match 3000

In the computer game Death Match 3000, two warriors take five turns striking each other. Initially, each warrior's health is 100%. Each time a warrior receives a strike from his/her opponent, his/her health is decremented by a random amount. This amount is called damage. If a warrior is healthy, damage is only a small fraction of health. As a warrior's health declines, the damage can be a larger fraction. Similarly, the amount of damage a warrior can inflich upon his/her opponent can never be more than the attacker's health. When a warrior's health reaches zero (if must never go below zero), the warrior is dead.

Implement the following classes:

// from Warrior.java
import java.util.*;
public class Warrior {
   private static Random generator = new Random();
}

// from DeathMatch3000.java
public class DeathMatch3000 {
   public static void main(String[] args) {
      //create 2 warriors and let them take turns striking each other
   }
}