Part A (Equality/Hashing) You are required to develop the above classes in Java and implement a suitable equals methods to test equality of the Student, Course and Enrolment classes. What instance...

Java web assignment file is attached


Part A (Equality/Hashing) You are required to develop the above classes in Java and implement a suitable equals methods to test equality of the Student, Course and Enrolment classes. What instance variables will you select to test for equality for each of the required classes and justify your choice as comments in your code. The specification recommends that you override the equals ( ) and getHashCode( ) methods of each of the required classes Test your classes by referring to the Test Documentation section below. Part B (Comparators) The Student, Course and Enrollment classes will be used in different Collections and the ordering of such elements would be an important requirement for this application. The application architect has recommended the implementation of the Java Comparator Interface to enable the proper ordering of the required classes. The Comparators for each of the classes should ignore the properties of the classes that are case sensitive, such as String types. The idea here is that, when ordering, for example a List of Student /Course/Enrollment objects in either ascending or descending order, the Comparator will ensure that the ordering makes sense. Test your Comparators by adding them to a List and Set and test if your ordering works correctly and refer to the Test Documentation section below
Dec 09, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here