subject
Computers and Technology, 20.08.2021 05:20 Hfruit

Write a Course class. A Course keeps track of Students enrolled in the Course (on the roster) and students on the waitlist for the Course. Implement methods to add a student to the course and drop a student from the course, using these rules: Students on the roster can be stored in any order.
Students on the waitlist should be stored in the order they were added.
A student can only be added to the course if they have paid their tuition.
A student cannot be on the roster or waitlist more than once.
A student cannot be on both the roster and the waitlist.
If a student on the roster drops the course, the first student from the waitlist should be added to the roster (and removed from the waitlist).
When searching for whether a student is on the roster or waitlist, compare the Student ids to see if a student is a match.
Extra Credit
Use an ArrayList: Write a class called CourseAL.
This class has the same methods as Course (listed above). Instead of using a Student[] to store the roster and waitlist, use an ArrayList. You can use the provided tester program to test your extra credit class (comment out line 24 and un-comment line 29).
Important: The equals method in Student compares two Student objects to see if they are the same (which, for our project, means that they have the same ID). This means you should not directly compare the IDs. In the extra credit, you should just compare two Student objects directly. (Remember what method you use to compare objects!)
For full credit, take advantage of the methods in the ArrayList class to implement the methods. Do not just swap out the array for an ArrayList- use the methods from the ArrayList class! You might be able to significantly streamline your code. Note that you will not earn full extra credit if you simply use an ArrayList to mimic an array.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
How can a user open a blank presentation? 1.on the file menu, click new, and then click recent templates 2.on the file menu, click new, and then click blank presentation 3. on the view menu, click templates, and then click recent templates 4. on the view menu, click samples, and then click blank presentation
Answers: 1
question
Computers and Technology, 22.06.2019 16:20
Consider the following statements, then select one of the answers below: the signal() function shown below registers "sig_handler()" as the signal handler function for the sigkill signal, without the complexity of using when the sigkill signal is sent to a process running this code, by a user typing "kill -kill ", where the correct process id is used for to target the process, sig_handler() will be executed.
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
You know the right answer?
Write a Course class. A Course keeps track of Students enrolled in the Course (on the roster) and st...
Questions
question
Mathematics, 05.03.2021 20:50
question
Mathematics, 05.03.2021 20:50
question
Mathematics, 05.03.2021 20:50
question
Law, 05.03.2021 20:50
question
Mathematics, 05.03.2021 20:50
question
Mathematics, 05.03.2021 20:50
Questions on the website: 13722359