Question
This project has three parts. Remember to make a copy of this project so you can refer to it when completing the other phases. Review
This project has three parts. Remember to make a copy of this project so you can refer to it when completing the other phases.
Review the sample program before starting this project. The program link is above the Project 1 link.
Playing a video game on a computer can give different experiences based on the performance capabilities of the computers 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 computers hardware.
Note: When declaring variables, initialize all variables to avoid the following error message: variable might not have been initialized.
Program Instructions:
Navigate to the Java program you created in the GitHub Repository Instructions document (Project_firstname_lastname - replaced with your name). Note: The project should remain in the CSC120Project folder created in the GitHub Repository Instructions document. If you did not complete the GitHub Repository Instructions, you should complete the steps before starting this assignment.
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.
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.
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.
Step 4:
Display a menu and ask the user to select the resolution of their monitor. The menu should contain the following options:
- 1280 x 720
- 1920 x 1080
- 2560 x 1440
- 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!
GitHub Desktop Commit:
- Save the project. Minimize the jGrasp window.
- Open the GitHub Desktop program on your computer. You will see your code.
- In the Description window enter the text; Added code for getting user input.
- Click the button: Commit to Project-1.
- Return to your project and continue to complete the next steps.
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:
Resolution | Multiplier |
1280 x 720 | 1 |
1920 x 1080 | .75 |
2560 x 1440 | .55 |
3840 x 2160 | .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.
Performance Score | Recommended Graphics Quality |
Over 17,000 | Ultra |
Over 15,000 but not more than 17,000 | High |
Over 13,000 but not more than 15,000 | Medium |
Over 11,000 but not more than 13,000 | Low |
11,000 or less | Unable to Play |
GitHub Desktop Commit:
- Save the project. Minimize the jGrasp window.
- Open the GitHub Desktop program on your computer. You will see your code.
- In the Description window enter the text: Added code for determining performance score and recommended graphics quality
- Click the button: Commit to Project-1.
- Return to your project and continue to complete the next steps.
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 with a comma and to three decimal places)
- The Recommended Graphics Quality
The code you submit should be thoroughly documented with comments where appropriate.
GitHub Desktop Commit:
You will make one last commit to your Project-1 branch. After completing the last commit, you will merge and push all changes to the remote repository.
- In the Description field in the bottom left of the window, enter the text: Added code for outputting the information.
- Click the Commit to Project-1 button.
- Switch to the main branch by clicking on the Current Branch menu. Select main.
- Go to Branch -> Merge into current branch...
- Select the Project-1 branch.
- Click the button: Merge Project-1 into main.
- This step will merge all the changes into the main branch.
- Click the button: Push origin to push all of the changes to the remote repository (i.e., the repository hosted on GitHub.com).
Submission Instructions
- Sign in to GitHub.com.
- Click the CSC120Project repository link. (Note: look under the Repositories list.)
- Click the Java source code file.
- Capture a screenshot of the Project window.
- Submit the screenshot in Blackboard.
Sample Input and Output (user input is in bold) - The output of your program should match the formatting and spacing exactly as shown
Please enter the clock speed (in Megahertz) of your graphics card: 1000
Please enter the clock speed (in Megahertz) of your processor: 3000
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: 1000 MHz
CPU Clock Speed: 3000 MHz
Number of cores: 2
Monitor Resolution: 1280 x 720
Performance Score: 11,000.000
Recommended Graphics Quality: Unable to Play
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started