Lab 1
Lab 1
In this LAB, you will create a basic data management system for students in the
Department of Computer Science. Department Office wants to create an object that
contains student data - name (note - the name of the student's last name appears first.
All the names in English, and of course a capital first letter: Muhammad not
muhammad), ID number and grades. All students may have grades for five courses:
introduction to programming, Introduction to Management, Data Structures,
Foundations of Economic Theory and Introduction to Mathematics (grade is an
integer between 40 and 100).
Write a class - Student. Student class consists of student data. For this purpose, you
must fulfill the following methods (note - fields of the objects should be marked as
private).
Student class:
Constructors:
Methods:
Return
Type Method name Operation
String )(getName Returns student name
long )(getId Returns student id
void setGrade(int course, int Assigns the grade of the student course (according to the above key).
grade)
Assigns the student's grades in his courses. You can enter grades in the way
void setGrades() you want, or by receiving grades from the user within the system.
double )(getAverage Returns the student average.
boolean equals(Student student) Gets student object and decides if this is the same student.
Returns a string containing the students data as follows: