1.4. Quiz
Quiz 1: Java Essentials
Coding
Create a class called
LongIntegerQuizunder the mainalgebraicpackage that extends theLongIntegerclass.Override the
addDifferentSign()method so that theadd()method inLongIntegerQuizcan handle integers with different signs.
Testing
Create the
LongIntegerQuizTestclass under the testalgebraicpackage.Test the correctness of your
LongIntegerQuizusing the unit tests.Add more tests for a more thorough assessment if necessary.
Quizzes
What is the advantage of using Generics?
How do you make the class you define comparable?
What is the advantage of overriding member methods in the Object class?
What kind of methods should be defined as static?
Submission
1. Commit and push everything under the following packages to your GitHub repository:
2. Submit answers to the above quizzes to Canvas.
Last updated
Was this helpful?