0% found this document useful (0 votes)
3 views4 pages

JAVA Assignment

The document contains an assignment for the course GET 211: Computer Programming, authored by Okpara Ephraim Ugochukwu. It includes a Java code snippet that implements a grading system based on student scores, detailing the corresponding grades for different score ranges. Additionally, a flowchart is mentioned to represent the if-ifelse-ifelse-if structure used in the code.

Uploaded by

okparaephraim20
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

JAVA Assignment

The document contains an assignment for the course GET 211: Computer Programming, authored by Okpara Ephraim Ugochukwu. It includes a Java code snippet that implements a grading system based on student scores, detailing the corresponding grades for different score ranges. Additionally, a flowchart is mentioned to represent the if-ifelse-ifelse-if structure used in the code.

Uploaded by

okparaephraim20
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd

Name: Okpara Ephraim Ugochukwu

Department : Mechanical Engineering

Date: 20th January, 2024

Course code: GET 211

Course Title’: Computer Programming

LECTURER: Mr Ukong Godwin


Assignment for if-ifelse-ifelse-if

Java Code:

Import [Link];

Public class StudentGrades {

Public static void main(String[] args) {

Scanner input = new Scanner([Link]);

[Link](“Enter the student’s score (0 – 100):”);

Int score = [Link]();

If (score >= 70 && score <= 100) {

[Link](“Grade: A”);

} else if (score >= 60 && score < 70) {

[Link](“Grade: B”);

} else if (score >= 50 && score < 60) {

[Link](“Grade: C”);

} else if (score >= 45 && score < 50) {

[Link](“Grade: D”);

} else if (score >= 40 && score < 45) {

[Link](“Grade: E”);

} else if (score >= 0 && score < 40) {

[Link](“Grade: F”);

} else {

[Link](“Invalid score. Please enter a value


between 0 and 100.”);

}
Explanation:

1. Grading System:

70-100: Grade A

60-69: Grade B

50-59: Grade C

45-49: Grade D

40-44: Grade E

0-39: Grade F

FLOWCHART TO REPRESENT IF-IFELSE-IFELSE-IF

You might also like