Question: 1. Use Notepad to create new text file named EX03_2.java. Enter the following two lines (be sure to replace YourFullName with your full name): //

1. Use Notepad to create new text file named "EX03_2.java". Enter the following two lines (be sure to replace YourFullName with your full name): // FileName: EX03_2.java // Programmer: YourFullName 2. Next to the above two lines, write a Java program that asks the user to enter two values: one for fasting blood sugar level, the other for "glycated hemoglobin. 3. Use the logical OR operator to create a "hybrid expression that combines two individual expressions: one checks if "fbs is greater than or equal to 126, the other checks if Ale" is greater than or equal to 6.5. 4. Then, use the "conditional operator" (?:) to evaluate the hybrid expression. Return a text Diabetes confirmed if at least one of the two individual expression in the hybrid expression evaluates to be true. Return a text No sign for diabetes if both individual expression in the hybrid expression evaluate to be false. 5. Make sure the output looks similar to the following. Enter the fasting blood sugar level: 117 Enter the glycated hemoglobin: 5.7 No sign for diabetes 97 Java Programming - Penniel P. Wu, PhD Enter the fasting blood sugar level: 147 Enter the glycated hemoglobin: 5.7 Diabetes confirmed Enter the fasting blood sugar level: 125 Enter the glycated hemoglobin: 6.8 Diabetes confirmed Enter the fasting blood sugar level: 147 Enter the glycated hemoglobin: 6.7 Diabetes confirmed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
