can someone help write this in java
Program 2: Buh-RING IT! For this assignment, you're going to simulate a text-based Role-Playing Game (RPG). Design (pseudocode) and implement (source) for a program that reads in 1) the hero's Hit Points (HP-or health), 2) the maximum damage the hero does per attack, 3) the monster's HP and 4) the maximum monster's damage per attack. When the player attacks, it will pick a random number between 0 and up to the maximum damage the player does, and then subtract that from the monster. The same thing happens when the monster attacks the hero, but damage is to the hero. The program should display rounds and the HP of the hero and monster each round. If the hero or monster dies, it should print that this happened and should NOT continue (ie, no extra text). To learn how to create random numbers, see the appendix. Sasporun 1: Enter the hero's starting hit points: 50 Enter the damage the hero's weapon does per strike: 20 Enter the monster's starting hit points: 40 Enter the monster's damage per strike: 15 ROUND 1 Hero attacks for: 10 Monster has 30 HP left Monster attacks you for: 1 You have 49 HP left ROUND 2 Hero attacks for: 18 Monster has 12 HP left Monster attacks you for: 7 You have 42 HP left ROUND 3 Hero attacks for: 0 Monster has 12 HP left Monster attacks you for: 14 You have 2B HP left - ROUND 4 - Hero attacks for: 18 Monster has -6 HP left The monster dies and you earn 5 XP Battle ends... Sample run 2 : Enter the hero's starting hit points: 50 Enter the damage the hero's weapon does per strike: 10 Enter the monster's starting hit points: 40 Enter the monster's damage per strike: 20 ROUND 1 Hero attacks for: 1 Monster has 39 HP left Monster attacks you for: 6 You have 44 HP left ROUND 2 Hero attacks for: 5 Monster has 34 HP left Monster attacks you for: 1 You have 43 HP Left ROUND 3 Hero attacks for: 8 Monster has 26 HP left Monster attacks you for: You have 35 HP left ROUND 4 Hero attacks for: 4 Monster has 22 HP left Monster attacks you for: 5