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 04:30
What kind of software users of all skill levels create web pages that include graphics, video, audio, animation, and other special effects? website authoring website software website publishing website editing
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan.in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan.out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
question
Computers and Technology, 23.06.2019 17:30
What are the most commonly found items in the trash according to the municipal solid waste report?
Answers: 1
question
Computers and Technology, 24.06.2019 02:20
The first time a user launches the powerpoint program, which view is shown allowing the user to access recent presentations or create new presentations based on templates?
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, 25.05.2021 01:00
question
Mathematics, 25.05.2021 01:00
question
Spanish, 25.05.2021 01:00
Questions on the website: 13722367