cs200 week 3

timer Asked: Apr 17th, 2017

Question description

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).


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.

GradeMinimum Percentage

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).

Please submit your screenshots and code in file titled with your GID number.

Supplemental Material

Tutor Answer

(Top Tutor) Studypool Tutor
School: Carnegie Mellon University
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors