> For the complete documentation index, see [llms.txt](https://emory.gitbook.io/dsa-java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://emory.gitbook.io/dsa-java/java-essentials/exercises.md).

# 1.4. Quiz

## Coding

* Create a class called [`LongIntegerQuiz`](https://github.com/emory-courses/dsa-java/blob/master/src/main/java/edu/emory/cs/algebraic/LongIntegerQuiz.java) under the main [`algebraic`](https://github.com/emory-courses/dsa-java/tree/master/src/main/java/edu/emory/cs/algebraic) package that extends the [`LongInteger`](https://github.com/emory-courses/dsa-java/blob/master/src/main/java/edu/emory/cs/algebraic/LongInteger.java) class.
* Override the [`addDifferentSign()`](https://github.com/emory-courses/dsa-java/blob/master/src/main/java/edu/emory/cs/algebraic/LongIntegerQuiz.java#L19) method so that the `add()` method in [`LongIntegerQuiz`](https://github.com/emory-courses/dsa-java/blob/master/src/main/java/edu/emory/cs/algebraic/LongIntegerQuiz.java) can handle integers with different signs.

## Testing

* Create the [`LongIntegerQuizTest`](https://github.com/emory-courses/dsa-java/blob/master/src/test/java/edu/emory/cs/algebraic/LongIntegerQuizTest.java) class under the test [`algebraic`](https://github.com/emory-courses/dsa-java/tree/master/src/test/java/edu/emory/cs/algebraic) package.
* Test the correctness of your `LongIntegerQuiz` using the unit tests.
* Add more tests for a more thorough assessment if necessary.

## Quizzes

1. What is the advantage of using *Generics*?
2. How do you make the class you define *comparable*?
3. What is the advantage of overriding member methods in the *Object* class?
4. What kind of methods should be defined as *static*?

## Submission

1\. Commit and push everything under the following packages to your GitHub repository:

* Main: [src/main/java/edu/emory/cs/algebraic](https://github.com/emory-courses/dsa-java/tree/master/src/main/java/edu/emory/cs/algebraic)
* Test: [src/test/java/edu/emory/cs/algebraic](https://github.com/emory-courses/dsa-java/tree/master/src/test/java/edu/emory/cs/algebraic)

2\. Submit answers to the above [quizzes](#quizzes) to Canvas.
