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)
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)
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 2CP
Related questions
Topic Video
Question
Basic java
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,