Objective: Write a program which replicates the final game of a famous price related game show....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Objective: Write a program which replicates the final game of a famous price related game show. In this version, a "Showcase" contains exactly 5 unique randomly selected prizes. The user must guess the sum of the prizes within $2,000 below or equal to the sum in order to win. Requirements: • Functionality. (80pts) o No Syntax, Major Run-Time, or Major Logic Errors. (80pts*) ■ *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 run-time or logic errors is nonfunctional code and will receive no points for this entire section. o Use only Arrays. (80pts*) ■ *Other built in types like ArrayLists, LinkedLists, etc will receive no points for this entire section. o Clear and Easy-To-Use Interface. (10pts) ■ 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. o Reading a Prize File. (20pts) ■ 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 (“\n”). ■ Each prize's name and price are separated by a tab ('\t') ■ The "Prize File" format is: <<Prize's Name 0>>\t<<Prize's Price 0>>\n <<Prize's Name 1>>\t<<Prize's Price 1>>\n ■ The program should ignore items that do not strictly follow the previously stated format. (HINT! There's 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. ■ All the above must apply for full credit. o Select Prize's for the Showcase. (20pts) ■ The program should randomly pick exactly 5 unique prizes from the prize data structure. ■ No prize should ever repeat in this selection. ■ All the above must apply for full credit. o Determine if the user won or lost. (20pts) ■ 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 user's guess was less than or equal the sum of the prizes and greater than or equal the sum of the prizes minus $1,000. If both are true, then the program must inform the user they won! Otherwise the program must inform the user they lost. • For Example, if sum of the prizes is $5,000 then the user wins if their guess is between $4,000 and $5,000 inclusively, otherwise they lose. ■ All the above must apply for full credit. o Run-Time and Logic Error Checking. (10pts) ■ Each major function must check for common run-time and logic errors. • Coding Style. (10pts) o Code functionality organized within multiple methods other than the main method, and methods organized within multiple classes where appropriate. (5pts) o Readable Code (5pts) ■ 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. (10pts) o Your name in the file. (5pts) o At least 5 meaningful comments in addition to your name. These must describe the function of the code it is near. (5pts) 20000 50000 Car Boat Moose 1000 Goat 200 Shredded wheat 2 Cheese 5 Milk 5 Bread 7 Big TV 1000 Life time supply of Cheetos Lamp 20 Blender 30 Food Processor 40 Camera 400 750 Watch Beard Supplies 800 Trip to Latvia 4000 Ski Equipment 1200 Pair of Scooters A basket of turtles Fiber Supplement Handful of hard candy Large Ball of Foil Heap of Makeup 100 A Pet Crow 50 A Trunk Full of Shoes Trip to New Zealand Robosaurus 100000 Espresso Making Ferrets 1200 Antacid 5 2000 20 6 2 5 Tennis Equipment Cereal 4 The Antidote Ping Pong Table 400 500 5000 A box of slightly used magazines Pinball Machine 1500 Jar of Tomato Paste Aspirin 8 Unreasonable amount of luncheon meat 1400 1600 250000 Dinette Set Bedroom Set Washer and Dryer Microwave 30 Latest Video Game Console Globe that lights up! 400 A sparkly necklace 800 500 A Large Cowboy Hat 200 Dollars in Cash Bag of 100 Tacos 5 1500 A Very Very Pretty Ring 1200 Guitar 1500 Banjo 120 Exotic Plants 500 2000 100 200 200 500 1 200 Objective: Write a program which replicates the final game of a famous price related game show. In this version, a "Showcase" contains exactly 5 unique randomly selected prizes. The user must guess the sum of the prizes within $2,000 below or equal to the sum in order to win. Requirements: • Functionality. (80pts) o No Syntax, Major Run-Time, or Major Logic Errors. (80pts*) ■ *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 run-time or logic errors is nonfunctional code and will receive no points for this entire section. o Use only Arrays. (80pts*) ■ *Other built in types like ArrayLists, LinkedLists, etc will receive no points for this entire section. o Clear and Easy-To-Use Interface. (10pts) ■ 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. o Reading a Prize File. (20pts) ■ 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 (“\n”). ■ Each prize's name and price are separated by a tab ('\t') ■ The "Prize File" format is: <<Prize's Name 0>>\t<<Prize's Price 0>>\n <<Prize's Name 1>>\t<<Prize's Price 1>>\n ■ The program should ignore items that do not strictly follow the previously stated format. (HINT! There's 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. ■ All the above must apply for full credit. o Select Prize's for the Showcase. (20pts) ■ The program should randomly pick exactly 5 unique prizes from the prize data structure. ■ No prize should ever repeat in this selection. ■ All the above must apply for full credit. o Determine if the user won or lost. (20pts) ■ 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 user's guess was less than or equal the sum of the prizes and greater than or equal the sum of the prizes minus $1,000. If both are true, then the program must inform the user they won! Otherwise the program must inform the user they lost. • For Example, if sum of the prizes is $5,000 then the user wins if their guess is between $4,000 and $5,000 inclusively, otherwise they lose. ■ All the above must apply for full credit. o Run-Time and Logic Error Checking. (10pts) ■ Each major function must check for common run-time and logic errors. • Coding Style. (10pts) o Code functionality organized within multiple methods other than the main method, and methods organized within multiple classes where appropriate. (5pts) o Readable Code (5pts) ■ 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. (10pts) o Your name in the file. (5pts) o At least 5 meaningful comments in addition to your name. These must describe the function of the code it is near. (5pts) 20000 50000 Car Boat Moose 1000 Goat 200 Shredded wheat 2 Cheese 5 Milk 5 Bread 7 Big TV 1000 Life time supply of Cheetos Lamp 20 Blender 30 Food Processor 40 Camera 400 750 Watch Beard Supplies 800 Trip to Latvia 4000 Ski Equipment 1200 Pair of Scooters A basket of turtles Fiber Supplement Handful of hard candy Large Ball of Foil Heap of Makeup 100 A Pet Crow 50 A Trunk Full of Shoes Trip to New Zealand Robosaurus 100000 Espresso Making Ferrets 1200 Antacid 5 2000 20 6 2 5 Tennis Equipment Cereal 4 The Antidote Ping Pong Table 400 500 5000 A box of slightly used magazines Pinball Machine 1500 Jar of Tomato Paste Aspirin 8 Unreasonable amount of luncheon meat 1400 1600 250000 Dinette Set Bedroom Set Washer and Dryer Microwave 30 Latest Video Game Console Globe that lights up! 400 A sparkly necklace 800 500 A Large Cowboy Hat 200 Dollars in Cash Bag of 100 Tacos 5 1500 A Very Very Pretty Ring 1200 Guitar 1500 Banjo 120 Exotic Plants 500 2000 100 200 200 500 1 200
Expert Answer:
Answer rating: 100% (QA)
Heres an example of how you can implement the program in Java to satisfy the requirements specified ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Consider a situation with two countries that have abatement cost functions : for j=L and j=H. The countries have identical damage functions D(E)= d.E.For each country the parameters s j are drawn...
-
A and B are events such that P(A) = 0.4 and P(B | A) = 0.7. Find P(A& B).
-
After a foreign substance is introduced into the blood, the rate at which antibodies are made is given by where time, t, is in minutes. Assuming there are no antibodies present at time t = 0, find...
-
Taj Mahabub was the founder and CEO of GenAudio, a Colorado-based audio technology company. GenAudio had struggled financially practically since its formation, and Mahabub wished to secure a...
-
Wilco Corporation has the following account balances at December 31, 2010. Prepare Wilco's December 31, 2010, stockholders' equitysection. Common stock, $5 par value Treasury stock Retained earnings...
-
Te If you have $90,000 in a bank account that is paying an interest rate of 6 percent that is being compounded annually, how many years will it take to double your investment if the interest rate...
-
Draw the AVL tree resulting from the insertion of an entry with key 52 into the AVL tree of Figure 11.13b. 4 62 44 78) 50 88 48 54 T4 T2 (b)
-
The purpose of adjusting entries is to: A. record revenues in the period in which they are earned B. record expenses in the period in which they are paid C. ensure the balances on the income...
-
1. Spartan Inc. has the following data: risk-free rate = 4.00%, market risk premium = 6%, and beta = 1.25. What is the firm's cost of equity from retained earnings based on the CAPM?
-
Imagine you are the Business Support Specialist at Uber Bangladesh. Your team has given you the aforementioned chart and looking forward to having some analysis for the management presentation. 1....
-
A project is expected to generate annual revenues of $119,300, with variable costs of $75,400, and fixed costs of $15,900. The annual depreciation is $3,950 and the tax rate is 34 percent. What is...
-
1. Apple stock is selling for $120 per share. Call options with a $117 exercise price are priced at $12. What is the intrinsic value of the option, and what is the time value? 2. Twitter is trading...
-
Assume that the NPV of the synergies for combined companies Acquirer and Target is $2,420 million. Number of shares of Target outstanding 200 million. Number of shares of Acquirer outstanding before...
-
You are the bond portfolio manager of ABT Ltd with four bond types in your portfolio to manage. Given the following characteristics of the bonds in the portfolio: BOND A: COUPON RATE 4%, MARKET YIELD...
-
The senior management at Davis Watercraft would like to determine if it is possible to improve firm profitability by changing their existing product mix. Currently, the product mix is determined by...
-
The U.S. per capita consumption (in pounds) of beef, pork, and chicken for 2000 and 2016 is given in the following table. Assume that the changes in consumption are approximately linear. (a)...
-
Repeat Exercise 67, but the closest point on the shore to the desired destination is now 25 ft from where he is standing. Exercise 67 A mathematician is surfing in Long Beach, New York. He is...
-
In Exercises, find f x (x, y) and f y (x, y). Then find f x (2, -1) and f y (-4, 3). Leave the answers in terms of e in Exercises. (x, y) = (7e x+2y + 4)(e x2 + y 2 + 2)
-
Let \(\left\{\mathbf{X}_{n}ight\}_{n=1}^{\infty}\) be a sequence of \(d\)-dimensional random vectors that converge in distribution to a random vector \(\mathbf{X}\) as \(n ightarrow \infty\). Let...
-
Let \(\mathbf{X}\) be a \(d\)-dimensional random vector with distribution function \(F\). Let \(g: \mathbb{R}^{d} ightarrow \mathbb{R}\) be a continuous function such that \(|g(\mathbf{x})| \leq b\)...
-
In the context of the proof of Theorem 4.3, prove that \[\lim _{n ightarrow \infty}\left|\int_{a}^{b} g_{m}(x) d F(x)-\int_{a}^{b} g(x) d F(x)ight| for any \(\delta_{\varepsilon}>0\). Theorem 4.3...
Study smarter with the SolutionInn App