Create a class named Student that contains the following data: ? The student\'s
ID: 3541012 • Letter: C
Question
Create a class named Student that contains the following data:
? The student's full name.
? The student ID.
? The amount of credits for study taken so far.
With Methods that:
? Return the full name of this student.
? Set a new name for this student.
? Return the student ID of this student.
? Add some credit points to the student's accumulated credits.
? Return the number of credit points this student has accumulated.
? Return the login name of this student. The login name is a combination of the first four characters of the student's
name and the first three characters of the student's ID number.
? Print the student's name and ID number to the output terminal.
Create another class named LabClass that contains the following data:
? Instructor, Room, and TimeAndDay as String variables.
? An array of students.
? Capacity as integer variable.
with a LabClass constructor with a maximum number of enrolments. All other details are set to default values.
With Methods that:
? Add a student to this LabClass.
? Return the number of students currently enrolled in this LabClass.
? Set the room number for this LabClass.
? Set the time for this LabClass. The parameter should define the day and the time of day, such as "Friday, 10am".
? Set the name of the instructor for this LabClass.
Write a program to test your classes.
Explanation / Answer
Too big code for 300 points
Sample output
Finding the login name for the details of
Student [fullName=JULIE ANDERSON, studentId=2GI08CS002]
Login Id is :
JULI2GI
Finding the credits available
200.0
Adding $500 credits to it
Total credits after addition is :
700.0
Add a student in the labClass
Student added
Showing the count of students enrolled in the Lab class
Total number of students enrolled are : 1
Finding the room number of lab class
102
Finding the time and day
Friday, 10am
Finding the Instructor's name
Mr. James Willy
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.