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" and not "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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!