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 09:00
What is one way in which tablets differ from laptops and notebooks? tablets are designed for touch-based interaction. tablets are designed to be used as desktops. tablets are designed for input via a keyboard and mouse. tablets are designed to be larger than laptops.
Answers: 1
question
Computers and Technology, 22.06.2019 11:10
The total cost of textbooks for the term was collected from 36 students. create a histogram for this data. $140 $160 $160 $165 $180 $220 $235 $240 $250 $260 $280 $285 $285 $285 $290 $300 $300 $305 $310 $310 $315 $315 $320 $320 $330 $340 $345 $350 $355 $360 $360 $380 $395 $420 $460 $460
Answers: 2
question
Computers and Technology, 22.06.2019 17:00
The two main ways in which marketers address the competition with their strategies are by satisfying a need better than a competition and by
Answers: 2
question
Computers and Technology, 24.06.2019 02:00
How are we able to create photographs differently than 100 years ago? explain your answer in relation to your photograph you selected.
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, 10.12.2021 16:50
question
Biology, 10.12.2021 16:50