Define a class Student that keeps track of academ icr ecord of students in a school. The class should containthe follow ing data m em ber s:rollNum – Roll num ber of studentname – Nam e of studentmarksList – List of m arks in fiv e subjectsstream – A: Ar ts, C: Com m er ce, S: Sciencepercentage – Per centage com puted using m arksgrade – Grade in each subject com puted using m arksdivision – Div ision com puted on the basis of ov erallper centageThe class should suppor t the follow ing m ethods:1 . __init__ for initializing the data m em ber s.2 . setMarks to take m arks for fiv e subjects as aninput from the user .3 . getStream for accessing the str eam of thestudent.4 . percentage for com puting the ov erallper centage for the student.5 . gradeGen that generates grades for each studentin each cour se on the basis of the m arksobtained. Cr iter ia for com puting the grade is asfollow s:Marks Grade>= 90 A<90 and >=80 B<80 and >=65 C<65 and >=40 D<40 E6. division for computi ng di v i si on on the basi s of the fol l ow i ngc r iter i a based on ov er al l per centage of mar k s scor ed:Percentage Division>= 60 I<60 and >=50 II<50 and >=35 III7 . __str__ that di spl ay s student i nfor mati on.
Question
Define a class Student that keeps track of academ icr ecord of students in a school. The class should containthe follow ing data m em ber s:rollNum – Roll num ber of studentname – Nam e of studentmarksList – List of m arks in fiv e subjectsstream – A: Ar ts, C: Com m er ce, S: Sciencepercentage – Per centage com puted using m arksgrade – Grade in each subject com puted using m arksdivision – Div ision com puted on the basis of ov erallper centageThe class should suppor t the follow ing m ethods:1 . init for initializing the data m em ber s.2 . setMarks to take m arks for fiv e subjects as aninput from the user .3 . getStream for accessing the str eam of thestudent.4 . percentage for com puting the ov erallper centage for the student.5 . gradeGen that generates grades for each studentin each cour se on the basis of the m arksobtained. Cr iter ia for com puting the grade is asfollow s:Marks Grade>= 90 A<90 and >=80 B<80 and >=65 C<65 and >=40 D<40 E6. division for computi ng di v i si on on the basi s of the fol l ow i ngc r iter i a based on ov er al l per centage of mar k s scor ed:Percentage Division>= 60 I<60 and >=50 II<50 and >=35 III7 . str that di spl ay s student i nfor mati on.
Solution
To define a class Student that keeps track of academic records of students in a school, follow these steps:
-
Define the class Student with the following data members:
- rollNum: Roll number of the student
- name: Name of the student
- marksList: List of marks in five subjects
- stream: Stream of the student (A: Arts, C: Commerce, S: Science)
- percentage: Percentage computed using marks
- grade: Grade in each subject computed using marks
- division: Division computed based on overall percentage
-
Implement the init method to initialize the data members of the class. This method should take rollNum and name as input parameters and initialize them.
-
Implement the setMarks method to take marks for five subjects as input from the user. This method should update the marksList data member.
-
Implement the getStream method to return the stream of the student.
-
Implement the percentage method to compute the overall percentage for the student. This method should calculate the average of the marks in marksList and update the percentage data member.
-
Implement the gradeGen method to generate grades for each student in each course based on the marks obtained. Use the following criteria to compute the grade:
- Marks >= 90: Grade A
- Marks < 90 and >= 80: Grade B
- Marks < 80 and >= 65: Grade C
- Marks < 65 and >= 40: Grade D
- Marks < 40: Grade E
-
Implement the division method to compute the division based on the overall percentage of marks scored. Use the following criteria:
- Percentage >= 60: Division I
- Percentage < 60 and >= 50: Division II
- Percentage < 50 and >= 35: Division III
-
Implement the str method to display student information. This method should return a string containing the rollNum, name, stream, percentage, grade, and division of the student.
By following these steps, you can define a class Student that keeps track of academic records of students in a school.
Similar Questions
Create a class called "Student" with private member variables for name, roll number, and marks in three subjects. Include public member functions to set the student details, calculate the average marks, and display the student detail
You have been assigned to develop a Course Enrollment and Grade Management System in Java for a university. The system should provide functionality to enroll students in courses, assign grades to students, and calculate overall course grades for each student. The project should demonstrate the effective utilization of static methods and variables to keep track of enrollment and grade-related information across multiple instances of the Student and Course classes. It should also showcase your ability to manipulate object state and define behavior through instance methods.Requirements:Student Class:The Student class should have private instance variables to store student information such as name, ID, and enrolled courses.Implement appropriate access modifiers and provide public getter and setter methods for accessing and updating student information.Design a method to enroll students in courses. It should accept a Course object as a parameter and add the course to the student's enrolled courses.Implement a method to assign grades to students. It should accept a Course object and a grade for the student and update the student's grade for that course. Course Class:The Course class should have private instance variables to store course information such as course code, name, and maximum capacity.Use appropriate access modifiers and provide public getter methods for accessing course information.Implement a static variable to keep track of the total number of enrolled students across all instances of the Course class.Design a static method to retrieve the total number of enrolled students.CourseManagement Class:The CourseManagement class should have private static variables to store a list of courses and the overall course grades for each student.Use appropriate access modifiers to control access to the variables.Implement static methods to add new courses, enroll students, assign grades, and calculate overall course grades for each student.The addCourse method should accept parameters for course information and create a new Course object. It should add the course to the list of courses.The enrollStudent method should accept a Student object and a Course object. It should enroll the student in the course by calling the appropriate method in the Student class.The assignGrade method should accept a Student object, a Course object, and a grade. It should assign the grade to the student for that course by calling the appropriate method in the Student class.The calculateOverallGrade method should accept a Student object and calculate the overall course grade for that student based on the grades assigned to them.Administrator Interface:Develop an interactive command-line interface for administrators to interact with the Course Enrollment and Grade Management System.Display a menu with options to add a new course, enroll students, assign grades, and calculate overall course grades.Prompt the administrator for necessary inputs and call the appropriate methods in the CourseManagement and Student classes to perform the requested operations.Implement error handling to handle cases where invalid inputs are provided or when enrolling students in courses that have reached their maximum capacity.Documentation:Provide comprehensive documentation for the project, explaining the purpose and usage of each class, method, and variable.Describe how static methods and variables are utilized to track enrollment and grade-related information across multiple instances of the Student and Course classes.Include instructions for running the program and interacting with the administrator interface.
A university registrar’s office maintains data about the following entities: (a)courses, including number, title, credits, syllabus, and prerequisites; (b) courseofferings, including course number, year, semester, section number, instructor(s),timings, and classroom; (c) students, including student-id, name, and program;and (d) instructors, including identification number, name, department, and title.Further, the enrollment of students in courses and grades awarded to studentsin each course they are enrolled for must be appropriately modeled.Construct an E-R diagram for the registrar’s office. Document all assumptionsthat you make about the mapping constraints.
You are developing a Student Record Management System in C. The system needs to store and manage information for multiple students, including their names, roll numbers, and marks obtained in different subjects. Implement array in structures to read, write, and compute average marks and the students scoring above and below the average marks for a class of N students. INPUT/OUTPUT EXAMPLE: Enter the number of students: 3 Enter details for 3 students: Student 1: Name: A Roll Number: 1 Marks in 5 subjects: Subject 1: 12 Subject 2: 13 Subject 3: 14 Subject 4: 15 Subject 5: 16 Student 2: Name: BB Roll Number: 2 Marks in 5 subjects: Subject 1: 11 Subject 2: 13 Subject 3: 12 Subject 4: 15 Subject 5: 14 Student 3: Name: CC Roll Number: 10 Marks in 5 subjects: Subject 1: 13 Subject 2: 14 Subject 3: 16 Subject 4: 17 Subject 5: 11 Class average marks: 13.73 Students scoring above average: A (Roll Number: 1) CC (Roll Number: 10) Students scoring below average: BB (Roll Number: 2)
A student management system has to be developed for a University. The University demands the following conditions to be incorporated in the system to efficiently handle the student information, including student IDs, names, and marks of three different subjects. Develop the student management system to ensure flexibility and scalability for enrolling new students.The conditions are given as follows.Store the student IDs, name, and the marks of three different subjects for n students using dynamic memory allocation. Implement a user-defined function by passing the address to display the information of each student.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.