Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**** THIS PROGRAM SHOULD BE WRITTEN IN C++**** **** THIS PROGRAM SHOULD BE WRITTEN IN C++**** Playing a video game on a computer can give

**** THIS PROGRAM SHOULD BE WRITTEN IN C++****

image text in transcribedimage text in transcribedimage text in transcribed**** THIS PROGRAM SHOULD BE WRITTEN IN C++****

Playing a video game on a computer can give different experiences based on the performance capabilities of the computer's hardware (typically processor and graphics card - among other things). Developers of a new game will typically have "recommended" specifications for the computer hardware that is required to run their games on a variety of graphics settings (the faster the hardware, the higher the graphics quality). You are being tasked to create a program that will tell a gamer what graphics quality they will be able to run a newly developed video game on, based on the specifications of their computer's hardware. Step 1: Ask the user to enter the clock speed (in Megahertz) of their graphics card (GPU). This is an indicator of how fast their graphics card is. Terminate the program if a value less than zero is entered for the clock speed. Step 2: Ask the user to enter the clock speed (in Megahertz) of their processor (CPU). This is an indicator of how fast their processor is. Terminate the program if a value less than zero is entered for the processor speed. Step 3: Ask the user to enter the number of cores that their processor (CPU) has. The more cores a processor has, the more work it can do. Terminate the program if a value less than zero is entered for the number of cores. Step 4: Display a menu and ask the user to select the resolution of their monitor. The menu should contain the following options: 1. 1280 x 720 2. 1920 x 1080 3. 2560 x 1440 4. 3840 x 2160 Note: Resolution consists of two numbers separated by an 'x.' The first number is the number of pixels in the width of the screen. The second number is the number of pixels in the height of the screen. We are not asking you to perform multiplication on this step! Terminate the program if an invalid menu choice is selected. Step 5: Assign a "multiplier" value (that will be used in a calculation in a later step) based on the monitor resolution by using the following table: Multiplier Resolution 1280 x 720 1920 x 1080 2560 x 1440 3840 x 2160 .75 .55 35 Step 6: Calculate a "performance score" by using the following formula: Performance Score = ((5 * GPU Clock Speed) + (Number of Cores * CPU Clock Speed)) * Multiplier Example: A GPU with a clock speed of 1200MHz, a 4-core CPU with a clock speed of 4200 MHz, and a 1280 x 720 resolution monitor would have a Performance Score calculation of: Performance Score = ((5 * 1200) + (4 * 4200)) * 1 = 22800 Step 7: Determine the recommended graphics quality that the hardware can support by using the information in the table below. Recommended Graphics Quality Ultra Performance Score Over 17,000 Over 15,000 but not more than 17,000 Over 13,000 but not more than 15,000 Over 11,000 but not more than 13,000 11,000 or less High Medium Low Unable to play Step 8: Create a String object in memory to hold the text "Computer Hardware Graphics Quality Recommendation Tool". Display that text at the top of the output (See sample Input and Output below). Step 9: Display the following output (See sample Input and Output below): The GPU clock speed The CPU clock speed The number of cores The Monitor Resolution The Performance Score (formatted to two decimal places) The Recommended Graphics Quality The code you submit should be thoroughly documented with comments where appropriate. Sample Run #1 (user input is underlined) Please enter the clock speed (in Megahertz) of your graphics card: 1000 e enter the clock speed (in Megahertz) of your processor: 3GGIO Please enter the number of cores of your processor: 2 What is the resolution of your monitor? 1. 1280 x 720 2. 1920 x 1080 3. 2560 x 1440 4. 3840 x 2160 Please select from the options above: 1 Computer Hardware Graphics Quality Recommendation Tool GPU Clock Speed: 1600 MHz CPU Clock Speed: 3000 MHz Number of cores: 2 Monitor Resoltion: 1280 x 720 Performance Score: 11000.00 Recommended Graphics Quality: Unable to Play

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions