Question: IN JAVA PLEASE: Homework 0 1 Showcase Showdown! Due 0 2 / 0 9 / 2 0 2 4 by 1 1 : 5 5
IN JAVA PLEASE: Homework
Showcase Showdown!
Due by :pm
Objective:
Write a program which replicates the final game of a famous price related game show. In this version, a Showcase contains exactly unique randomly selected prizes. The user must guess the sum of the prizes within $ below or equal to the sum in order to win.
Requirements:
Functionality. pts
No Syntax, Major RunTime, or Major Logic Errors. pts
Code that cannot be compiled due to syntax errors is nonfunctional code and will receive no points for this entire section.
Code that cannot be executed or tested due to major runtime or logic errors is nonfunctional code and will receive no points for this entire section.
Use only Arrays. pts
Other built in types like ArrayLists, LinkedLists, etc will receive no points for this entire section.
Clear and EasyToUse Interface. pts
Users should easily understand what the program does and how to use it
Users should be prompted for input and should be able to enter data easily.
Users should be presented with output after major functions, operations, or calculations.
Users should be able to perform any number of the required functions. In addition, users should be able to choose when to terminate the program.
All the above must apply for full credit.
Reading a Prize File. pts
The program must read from a Prize File and using that information it must populate a data structure of prizes.
Each prize in the file has a name and price separated by and end line
Each prizes name and price are separated by a tab t
The Prize File format is:
t
t
The program should ignore items that do not strictly follow the previously stated format. HINT Theres at least one item in the file that is not formatted correctly
Example Prize File
You may either assume the Prize File is constant or you may ask the user to enter a prize filename.
You do not need to create the file yourself, and you may use the provided example file.
All the above must apply for full credit.
Select Prizes for the Showcase. pts
The program should randomly pick exactly unique prizes from the prize data structure.
No prize should ever repeat in this selection.
All the above must apply for full credit.
Determine if the user won or lost. pts
The user must be presented with the prizes names before they make a guess, and it must clearly prompt the user for a guess.
The user should be able to enter their guess.
The program then must determine if the users guess was less than or equal the sum of the prizes and greater than or equal the sum of the prizes minus $ If both are true, then the program must inform the user they won! Otherwise the program must inform the user they lost.
All the above must apply for full credit.
RunTime and Logic Error Checking. pts
Each major function must check for common runtime and logic errors.
Coding Style. pts
Code functionality organized within multiple methods other than the main method, and methods organized within multiple classes where appropriate. pts
Readable Code pts
Meaningful identifiers for data and methods.
Proper indentation that clearly identifies statements within the body of a class, a method, a branching statement, a loop statement, etc.
All the above must apply for full credit.
Comments. pts
Your name in the file. pts
At least meaningful comments in addition to your name. These must describe the function of the code it is near. ptsWelcome to the showcase show down!
Your prizes are:
Car
Antacid
Cheese
Goat
Guitar
You must guess the total cost of the prizes without going over and within $ of its actual price
Enter your guess
The actual cost was
Your guess was over. You lose
Would you like to quit? Enter "yes" to quit
no
Your prizes are:
Fiber Supplement
Espresso Making Ferrets
A Very Very Pretty Ring
Goat
Dollars in Cash
You must guess the total cost of the prizes without going over and within $ of its actual price
Enter your guess
The actual cost was
Your guess was close, but not close enough. You lose.
Would you like to quit? Enter "yes" to quit
no
Your prizes are:
Car
Beard Supplies
Watch
Microwave
Milk
You must guess the total cost of the prizes without going over and within $ of its actual price
Enter your guess
The actual cost was
You win!
Would you like to quit? Enter "yes" to quit
yes
Goodbye!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
