Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Project2_Michael_Cheng {
- public static void main(String[] args) {
- final double res1 = 1;
- final double res2 = .75;
- final double res3 = .55;
- final double res4 = .35;
- double opt1 = 0.0;
- double opt2 = 0.0;
- double opt3 = 0.0;
- double opt4 = 0.0;
- Scanner keyboard = new Scanner(System.in);
- System.out.print("Please enter the clock speed (in Megahertz) of your graphics card: "); // step 1
- double gcard = keyboard.nextDouble(); // user input for the name of the graphic card
- System.out.print("Please enter the clock speed (in Megahertz) of your processor: ");
- double processor = keyboard.nextDouble(); // variable for processor
- System.out.print("Please enter the number of cores of your processor: ");
- double cores = keyboard.nextDouble(); // variable for cores
- System.out.println("What is the resolution of your monitor?");
- System.out.println();
- System.out.println(" 1. 1280 x 720");
- System.out.println(" 2. 1920 x 1080");
- System.out.println(" 3. 2560 x 1440");
- System.out.println(" 4. 3840 x 2160");
- System.out.println();
- System.out.print("Please select from the options above: ");
- int option = keyboard.nextInt();
- while (option < 1 || option > 4) {
- System.out.print("Please select from the options above: ");
- option = keyboard.nextInt();
- }
- double pscore = 0 ;
- pscore = ((5 * gcard) + (4 * processor )) * 1 = 22800
- double recommend = 0.0;
- double performance = 0.0;
- if (area < 250) {
- btuCap = 5500;
- }
- else if (area >= 250 && area <= 500) {
- btuCap = 10000;
- }
- else if (area > 500 && area < 1000) {
- btuCap = 17500;
- }
- else {
- btuCap = 24000;
- }
- double btuShade = 0.0; // variable for increase or decrease of BTU capacity
- String shade = "shade";
- if (option == 1) {
- btuShade = 0.15;
- shade = "Little";
- }
- else if (option == 2) {
- shade = "Moderate";
- }
- else if (option == 3) {
- recommend = "
- else {
- btuShade = -0.10;
- shade = "Abundant";
- }
- btuCap += btuCap * btuShade;
- System.out.println();
- String s1 = "Computer Hardware Graphics Quality Recommendation Tool";
- System.out.println(s1);
- System.out.println("GPU Clock Speed: " + gcard);
- System.out.println("CPU Clock Speed: " + processor);
- System.out.println("Number of cores: " + cores);
- System.out.println("Monitor Resolution: " + resolution);
- System.out.printf("BTU's Per Hour needed: %,.0f\n", btuCap);
- System.out.println();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement