In this exercise, you will use java arrays and collections to solve a series of problems. You will use provided unit tests to verify that your solutions are correct.
There is one set of required exercises in this project. You will find the exercises in the
src/main/java/org/example/CollectionExercises.java
file.
There is also an optional set of challenges that involve creating a simple student manager. You will find the
StudentManager
class in the src/main/java/org/example
folder.
You will find the collection exercises in the src/main/java/org/example/CollectionExercises.java
file.
Each method in this class is a collection exercise. You will need to implement the method to solve the problem described in the comments within the method.
Once you have completed the exercises, run the tests in the src/test/java/org/example/CollectionExercisesTests.java
file to verify that your solutions are correct.
To run these tests, right-click on the CollectionExercisesTests
class and select Run 'CollectionExercisesTests'
.
You will see the results of the tests in the Run
tab at the bottom of the IDE.
A class named StudentManger
is included in this project to show a larger example of collections applied to a "real"
program. The StudentManager
class is a simple program that allows the user to manage a list of students. The program
allows the user to add students, remove students, and display the list of students.
The main menu is implemented in this class, but the methods that perform the actions are not implemented. You will need
to follow the comments in the StudentManager
class to implement the methods.
Once you have implemented the methods, you can run the Main
class to test the program. The Main
class is located in
the src/main/java/org/example
folder. There are no unit tests for this class, as it involves input and output, so you
will need to test it manually.