Question: A new class that represent the computer's hardware. Add a brief comment at the top of the program that describes your class. The class

A new class that represent the computer's hardware.  

Add a brief comment at the top of the program that describes your class. 

The class should have the following fields: 

The GPU clock speed 

The CPU clock speed 

The number of CPU cores 

The resolution of the monitor (as an integer

The class should have the following constructors: 

A no-arg constructor that explicitly initializes all fields 

A constructor that accepts the following values as arguments and assigns them to the appropriate fields: GPU clock speed, CPU clock speed, number of CPU cores, and monitor resolution (as an integer

The class should have appropriate mutator methods (i.e., setters) that store values in the fields. 

The class should have the following accessor methods (i.e., getters). 

A method named getResolutionString that accepts no arguments and returns the monitor's resolution as a String 

A method named getMultiplierValue that accepts no arguments and returns the appropriate multiplier value for the computer. 

A method named calculatePerformanceScore that accepts no arguments and calculates and returns the performance score of the computer hardware 

A method named getRecommendedQuality that accepts no arguments and returns the recommended graphics quality 

A method named displayInformation that accepts no arguments and prints out the information for a single computer. 

Step 2: 

Demonstrate the class by modifying your existing project to create an instance of the HardwareLastname class.  Store the user's input in the HardwareLastname object by calling the constructor that accepts arguments. The program should display the output as shown in the Sample Input/Output (see below). 

Sample Input and Output (user input is in bold) - The output of your program should match the formatting and spacing exactly as shown 

How many computers are being processed? 3 

  

Computer Hardware Graphics Quality Recommendation Tool 

  

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: 4 

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 

  

GPU Clock Speed: 1000 MHz 

CPU Clock Speed: 3000 MHz 

Number of cores: 4 

Monitor Resolution: 1280 x 720 

Performance Score: 17,000.000 

Recommended Graphics Quality: High 

  

Please enter the clock speed (in Megahertz) of your graphics card: 1250 

Please enter the clock speed (in Megahertz) of your processor: 3200 

Please enter the number of cores of your processor: 4 

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: 3 

  

GPU Clock Speed: 1250 MHz 

CPU Clock Speed: 3200 MHz 

Number of cores: 4 

Monitor Resolution: 2560 x 1440 

Performance Score: 10,477.500 

Recommended Graphics Quality: Unable to Play 

  

Please enter the clock speed (in Megahertz) of your graphics card: 1800 

Please enter the clock speed (in Megahertz) of your processor: 4300 

Please enter the number of cores of your processor: 4 

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: 2 

  

GPU Clock Speed: 1800 MHz 

CPU Clock Speed: 4300 MHz 

Number of cores: 4 

Monitor Resolution: 1920 x 1080 

Performance Score: 19,650.000 

Recommended Graphics Quality: Ultra 

  

The highest performance score was: 19,650.000 

The lowest performance score was: 10,477.500 









































































Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javautilScanner public class HardwareLastname private int gpuClockSpeed private int cpuClockSpeed private int numCores private int monitorResol... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!