2. Name the demo file firstname_lastname_PE2 Create a program that simulates a dumpster diving game. Dumpster diving is when you search for loot in large industrial sized trash bins. In the game you...


2. Name the demo file firstname_lastname_PE2<br>Create a program that simulates a dumpster diving game. Dumpster diving is when you search for loot in<br>large industrial sized trash bins. In the game you will roll a ten-sided dice to determine what the user<br>has received. Use the UML below as a guide for the Die class (Name the class Die.java).<br>Die<br>- sideUp: int = 10<br>- value: int<br>+ Die()<br>+ roll(): void<br>+ getvalue(): int<br>Below are some suggestions to aid you in designing the game:<br>• Each round of the game is performed as an iteration of a loop that repeats as long as the player<br>wants to

Extracted text: 2. Name the demo file firstname_lastname_PE2 Create a program that simulates a dumpster diving game. Dumpster diving is when you search for loot in large industrial sized trash bins. In the game you will roll a ten-sided dice to determine what the user has received. Use the UML below as a guide for the Die class (Name the class Die.java). Die - sideUp: int = 10 - value: int + Die() + roll(): void + getvalue(): int Below are some suggestions to aid you in designing the game: • Each round of the game is performed as an iteration of a loop that repeats as long as the player wants to "dive" for more items. • At the beginning of each round, the program will ask the user whether or not he or she wants to continue diving. The program simulates the rolling of a ten-sided die Each item that can be caught is represented by a number generated from the die; for example, 1 for "a half-eaten sandwich", 2 for "a left shoe", 3 for "a broken watch", and so on. • Each item the user catches is worth a different amount of points. • The loop keeps a running total of the user's loot points. • After the loop has finished, the total number of loot points is displayed, along with a message that varies depending on the number of points earned. Program must ask user if they want to dive again (-30% if it doesn't)

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here