Question: The following sections describe the coding challenge. DLNode Instructions Add class named DLNode with a generic type param T Add ivar data of of type
The following sections describe the coding challenge.
DLNode
Instructions
- Add class named "DLNode" with a generic type param "T"
- Add ivar "data" of of type "T"
- Add ivar "prevNode" of type "DLNode" with sub-type "T"
- Add ivar "nextNode" of type "DLNode" with sub-type "T"
- Add a constructor with one parameter that sets the "data" ivar
- Add a getter for each ivar
- Add a setter for each ivar
- Add a method named "hasPrev" with no method params. It should return true if this node has a previous node (is not null)
- Add a method named "hasNext" similar to "hasPrev" but regarding the next node.
Note Well -- remember to include generic type on DLNode declarations (ivars and other). E.g. declare as "DLNode
Test Code
Write two test code classes.
- DLSmokeTest
- DLTest
Each should extend (subclass) the superclass "AbstractTest".
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
