Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

import javautilScanner public class HardwareLastname private int gpuClockSpeed private int cpuClockSpeed private int numCores private int monitorResol... 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

Recommended Textbook for

Systems analysis and design

Authors: kenneth e. kendall, julie e. kendall

8th Edition

135094909, 013608916X, 9780135094907, 978-0136089162

More Books

Students also viewed these Programming questions

Question

Which other character brings out a particular part? And why?

Answered: 1 week ago