arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

1.4. Quiz

Quiz 1: Java Essentials

hashtag
Coding

  • Create a class called LongIntegerQuizarrow-up-right under the main algebraicarrow-up-right package that extends the LongIntegerarrow-up-right class.

  • Override the method so that the add() method in can handle integers with different signs.

hashtag
Testing

  • Create the class under the test package.

  • Test the correctness of your LongIntegerQuiz using the unit tests.

  • Add more tests for a more thorough assessment if necessary.

hashtag
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?

hashtag
Submission

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

  • Main:

  • Test:

2. Submit answers to the above to Canvas.

What kind of methods should be defined as static?

addDifferentSign()arrow-up-right
LongIntegerQuizarrow-up-right
LongIntegerQuizTestarrow-up-right
algebraicarrow-up-right
src/main/java/edu/emory/cs/algebraicarrow-up-right
src/test/java/edu/emory/cs/algebraicarrow-up-right
quizzes