1.4. Quiz
Quiz 1: Java Essentials
Coding
Create a class called
LongIntegerQuiz
under the mainalgebraic
package that extends theLongInteger
class.Override the
addDifferentSign()
method so that theadd()
method inLongIntegerQuiz
can handle integers with different signs.
Testing
Create the
LongIntegerQuizTest
class under the testalgebraic
package.Test the correctness of your
LongIntegerQuiz
using 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