Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help with the following JAVA coding challenge. DLNode Instructions Add class named DLNode with a generic type param T Add ivar data of of
Please help with the following JAVA 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started