You are being asked to create a (Comparable) data class Student that will be used to maintain information for registration, and create a StudentRecord class that extends Student, and will include an ArrayList of Courses for each student. For this project, your Student class will contain the student's firstName, lastName, IDNO. The IDNO will be a String type, since it will not be used for "arithmetic" (at least no right away!) The IDNO will consist of the first initial of the student's lastname, and a 6-digit code. Your class should include a constructor that will accept the student's name and ID You should include the necessary accessors and mutators, equals, comDArTo, toStcins. equals will check the IDNO compareTe will be used to alphabetize students by their names (last, then first if needed) toStcing will return a "formatted" string for the student name and ID. (the format is up to you) The StudentRecord class will have a separate toString method, but the Araylist of courses will not be used in "equals" or "compareTo". After you compile the class, run a test to make sure that your class "works". You may test the class using 4 students. Example of students: Mary Doe 123 John Smith 124 John Smith 134 Mary Smith 145 CS313, CS220, Mus201 - then enter Mary Doe 123 again. (the duplicate should show.) You just want to make sure that greater than, less than, and equal all work correctly. I suggest creating a text file for the students (so you don't have to keep typing them in!) (You may use Scanner and PrintWriter for your I/O files)

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 2CP
icon
Related questions
Topic Video
Question
Basic java
"Warm-Up Project"
Student Class / StudentRecord Class
You are being asked to create a (Comparable) data class Student that will be used to maintain
information for registration, and create a StudentRecord class that extends Student, and will
include an ArrayList of Courses for each student.
For this project, your Student class will contain the student's firstName, lastName, IDNO.
The IDNO will be a String type, since it will not be used for "arithmetic" (at least no right away!)
The DNo, will consist of the first initial of the student's lastname, and a 6-digit code.
Your class should include a constructor that will accept the student's name and ID.
You should include the necessary accessors and mutators, equals, conpareTo, toString.
equals will check the IDNO
SoupareTo will be used to alphabetize students by their names (last, then first if needed)
teStcing will return a "formatted" string for the student name and ID. (the format is up to you)
The StudentRecord class will have a separate toString method, but the ArrayList of courses will
not be used in "equals" or "compareTo".
After you compile the class, run a test to make sure that your class "works". You may test the
class using 4 students.
Example of students:
Mary Doe 123
John Smith 124
John Smith 134
Mary Smith 145 CS313, CS220, Mus201
- then enter Mary Doe 123 again. (the duplicate should show.)
You just want to make sure that greater than, less than, and equal all work correctly.
I suggest creating a text file for the students (so you don't have to keep typing them in!)
(You may use Scanner and PrintWriter for your I/O files)
Transcribed Image Text:"Warm-Up Project" Student Class / StudentRecord Class You are being asked to create a (Comparable) data class Student that will be used to maintain information for registration, and create a StudentRecord class that extends Student, and will include an ArrayList of Courses for each student. For this project, your Student class will contain the student's firstName, lastName, IDNO. The IDNO will be a String type, since it will not be used for "arithmetic" (at least no right away!) The DNo, will consist of the first initial of the student's lastname, and a 6-digit code. Your class should include a constructor that will accept the student's name and ID. You should include the necessary accessors and mutators, equals, conpareTo, toString. equals will check the IDNO SoupareTo will be used to alphabetize students by their names (last, then first if needed) teStcing will return a "formatted" string for the student name and ID. (the format is up to you) The StudentRecord class will have a separate toString method, but the ArrayList of courses will not be used in "equals" or "compareTo". After you compile the class, run a test to make sure that your class "works". You may test the class using 4 students. Example of students: Mary Doe 123 John Smith 124 John Smith 134 Mary Smith 145 CS313, CS220, Mus201 - then enter Mary Doe 123 again. (the duplicate should show.) You just want to make sure that greater than, less than, and equal all work correctly. I suggest creating a text file for the students (so you don't have to keep typing them in!) (You may use Scanner and PrintWriter for your I/O files)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,