Assessment 4: Polymorphism and Dynamic Binding
This assessment will measure your ability to:
- Understand overridden methods Java
- Understand the
super keyword in Java
- Understand polymorphism in Java
- Understand dynamic binding in Java
- Understand Junit test cases (and running them on Eclipse)
- Write Java code with good style, elegance, and readability
This assessment is designed to be completed in fifty minutes or less.
You'll be modifying your classes from Project 1 in order to get them to work with the
with this assessment. In particular, we're going to ask you to change the return types of
some of the methods to type
String, and to paste-together a meaningful string based on the order or various
method calls in your project, which you'll then return. Make sure not to modify the unit tests, otherwise your code won't run correctly on Marmoset.
In order for you to do well on this assessment, you'll need to look at the test cases and isolate which methods are producing
which strings, based on dynamic binding as well as how your overridden methods currently call methods in the parent classes.
Some of this will be trial and error, but the good news is that the actual code you need to write is very simple (you're
just pasting together strings).
Upload all of your project files to Marmoset using the link to CS211_assessment4_sample. Make sure you click the correct link,
as there are ten versions of this assessment, and your answers will only work for one of them.
See the instructions below to walk you through how to upload a file to Marmoset.
[Marmoset upload help] (opens in new window)