Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Labl: Implementation of the Student class Student class description The student class should describe student's last name, first name, id (letter 'J'followed by an 8-digit
Labl: Implementation of the Student class Student class description The student class should describe student's last name, first name, id (letter 'J'followed by an 8-digit number), gpa (a real number in the range of 0.0 to 4.0), a whole number of credits completed, and a single letter status indicating full time ('F') or part time(P). All students should be full time by default, unless their status is changed The operations (methods) to implement include the following 1.Create a new student given the first name, last name, id and status (gpa and number of completed credits both initialized to zero). 2 Create a transfer sthident given the first name, last name, id,status, gpa and number of credits. 3.Determine student's id. 4.Determine student's name S. Determine student's status G e 6.Determine student's gpa 7. Determine student's number of credits. 8.Change student's status pdate number of completed credits for a student by adding the new number (for example credits completed in the current semester) to the current number of credits. The number of completed credits should never decrease. Change student's gpa (replace the old value of the gpa with new one 10.Produce a string with student information in the following format: LastName, FirstName id status gpa numberOfCredits Also we need the main) method to start the execution. Make sure that your class can handle the following situations: 1. Create a new student with valid first/last name, id, and status. 2. Create a new student with valid first/last name, id, and invalid status. 3. Create a new student with valid first/last name, invalid id, and valid status. Create a new student with valid first/last name, invalid id, and invalid status 5. Create a transfer student with valid first/last name, id, status, gpa and number of credits. Create a transfer student with valid first/last name, id, status, invalid gpa and valid number of credits. 7. Create a transfer student with valid first/last name, id, status, gpa and invalid number of credits NOTE: In all of the above cases, you can assume that the first and last names are valid. 8. Change student's status from part time to full time 9. Change student's status from full time to part time 10. Change student's status from part/full time to an invalid status 11. Change student's number of completed credits by adding a positive integer to the current number 12. Change student's number of completed credits by adding a negative integer to the current number (this should not decrease the current number of credits) After each test you should print the string with student information (using the format described above) for the student that was just modified. A method is needed for this. You may name it printStudentlnformation), which takes the Jno as the parameter Think about how you would represent an entire database of students using a Java class. What operations should that kind of database provide and how (insertions, deletions, queries, modifications of student data)? Notes 1.All attributes should be made private and setters according to the naming conventions. For example, getter for retrieving Jno should be getJNoO 3. Turn in your code and test runs. Make sure you present it in a way that the reader is sure your program does run properly for all the scenarios and the setter for setting Jno should be named setJNoO
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started