Flow of control in java when processing data it is


Flow of Control in Java

When processing data, it is necessary to make comparisons and validate the information entered. This week those skills will be learned by understanding the if-else and looping statements (while, do-while, and for-loop).

Assignment:

Part I:

Modify the program in Example 5.4 on page 225-226 to implement the new grading system below. Change the program by making the variable letterGrade a String variable instead of a character (char) variable, and change the if-else statement to assign the appropriate grade for the test score entered.

Grade

Minimum Percentage

A+

97

A

93

A-

90

B+

87

B

83

B-

80

C+

77

C

73

C-

70

D+

67

D

65

D-

60

F

0

Part II: Read section 6.5, Type-Safe Input Using Scanner, on page 310. Review the code in Example 6.10 on page 313 and modify the input in the above program to make sure the test score entered is an integer.

Run the program and enter 75.1, J, and 75.

Make a screenshot of the output and include it as an attachment to the Week 3 Assignment. Also, include the program code in a text file to run on another computer. Make sure to add comments to your code for full credit (see page 45).

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Flow of control in java when processing data it is
Reference No:- TGS01556758

Now Priced at $20 (50% Discount)

Recommended (96%)

Rated (4.8/5)