Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
830
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Project2_Michael_Cheng {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. final double res1 = 1;
  8. final double res2 = .75;
  9. final double res3 = .55;
  10. final double res4 = .35;
  11. double opt1 = 0.0;
  12. double opt2 = 0.0;
  13. double opt3 = 0.0;
  14. double opt4 = 0.0;
  15.  
  16.  
  17. Scanner keyboard = new Scanner(System.in);
  18.  
  19.  
  20. System.out.print("Please enter the clock speed (in Megahertz) of your graphics card: "); // step 1
  21. double gcard = keyboard.nextDouble(); // user input for the name of the graphic card
  22.  
  23.  
  24. System.out.print("Please enter the clock speed (in Megahertz) of your processor: ");
  25. double processor = keyboard.nextDouble(); // variable for processor
  26.  
  27. System.out.print("Please enter the number of cores of your processor: ");
  28. double cores = keyboard.nextDouble(); // variable for cores
  29.  
  30. System.out.println("What is the resolution of your monitor?");
  31. System.out.println();
  32. System.out.println(" 1. 1280 x 720");
  33. System.out.println(" 2. 1920 x 1080");
  34. System.out.println(" 3. 2560 x 1440");
  35. System.out.println(" 4. 3840 x 2160");
  36. System.out.println();
  37. System.out.print("Please select from the options above: ");
  38. int option = keyboard.nextInt();
  39.  
  40. while (option < 1 || option > 4) {
  41. System.out.print("Please select from the options above: ");
  42. option = keyboard.nextInt();
  43. }
  44.  
  45. double pscore = 0 ;
  46. pscore = ((5 * gcard) + (4 * processor )) * 1 = 22800
  47.  
  48.  
  49.  
  50. double recommend = 0.0;
  51.  
  52. double performance = 0.0;
  53.  
  54. if (area < 250) {
  55. btuCap = 5500;
  56. }
  57. else if (area >= 250 && area <= 500) {
  58. btuCap = 10000;
  59. }
  60. else if (area > 500 && area < 1000) {
  61. btuCap = 17500;
  62. }
  63. else {
  64. btuCap = 24000;
  65. }
  66.  
  67. double btuShade = 0.0; // variable for increase or decrease of BTU capacity
  68.  
  69. String shade = "shade";
  70.  
  71. if (option == 1) {
  72. btuShade = 0.15;
  73. shade = "Little";
  74. }
  75. else if (option == 2) {
  76. shade = "Moderate";
  77. }
  78. else if (option == 3) {
  79. recommend = "
  80. else {
  81. btuShade = -0.10;
  82. shade = "Abundant";
  83. }
  84.  
  85. btuCap += btuCap * btuShade;
  86.  
  87. System.out.println();
  88. String s1 = "Computer Hardware Graphics Quality Recommendation Tool";
  89. System.out.println(s1);
  90. System.out.println("GPU Clock Speed: " + gcard);
  91. System.out.println("CPU Clock Speed: " + processor);
  92. System.out.println("Number of cores: " + cores);
  93. System.out.println("Monitor Resolution: " + resolution);
  94. System.out.printf("BTU's Per Hour needed: %,.0f\n", btuCap);
  95. System.out.println();
  96.  
  97. }
  98.  
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement