JAVA-SE-Tutorial-codeswithpankaj
JAVA-SE-Tutorial-codeswithpankaj copied to clipboard
Student Report Card System
Objective
Create a Java application that accepts student details and their marks in various subjects, calculates the total and percentage, determines the pass/fail status, and assigns grades if the student passes. The application should handle input and output operations effectively and display the results in a formatted manner.
Requirements
Input Section
-
Student Details:
- Name
- Roll Number
-
Marks:
- JAVA
- C++
- Go
- Ruby
- C#
- Python
Output Section
- Display the marks for each subject.
- Calculate and display the total marks and percentage.
- Determine and display the pass/fail status based on the percentage.
- If the student passes, display the grade according to the grading system.
Grading System
- 80 - 100: Grade A
- 60 - 80: Grade B
- 40 - 60: Grade C
- 30 - 40: Grade D
Pass/Fail Criteria
- A student must have a minimum percentage of 40% to pass.
Instructions
- Create a
Student
class to store the student's name, roll number, and marks for each subject. - Create methods for calculating total marks, percentage, and determining the pass/fail status.
- Create methods for assigning grades if the student passes.
- Implement input validation to ensure marks are between 0 and 100.
Example
Input
Enter your name: Nishant
Enter Your Roll Number: A1023
Enter Your JAVA Marks: 50
Enter Your C++ Marks: 20
Enter Your Go Marks: 25
Enter Your Ruby Marks: 96
Enter Your C# Marks: 70
Enter Your Python Marks: 65
Output
Student Report Card
-------------------
Name: Nishant
Roll Number: A1023
Marks:
JAVA = 50/100
C++ = 20/100 F
Go = 25/100 F
Ruby = 96/100
C# = 70/100
Python = 65/100
Total = 326/600
Percentage = 54%
Status: FAIL
Grading System (if passed):
80 - 100 = Grade A
60 - 80 = Grade B
40 - 60 = Grade C
30 - 40 = Grade D
Assignment Submission
Submit the Java source code file along with a document explaining the implementation, including how the input validation was handled and how the grading system was implemented.