Question
answer this part only, please use java with screenshots included to undertand each step clearly(red part), you need to make from the top question,and then
answer this part only, please use java with screenshots included to undertand each step clearly(red part),
you need to make from the top question,and then provide me with the DoubleLinkedList because i have error
import java.util.LinkedList;
public class MyDoubleLinkedList
private DoubleNode
public void insertAtFront(T item) {
DoubleNode
public void removeAtFront() { if (front == null) { System.out.println("Nothing to remove... Operation invalid..."); return; }
DoubleNode
public void print() { System.out.println("List from front to end"); DoubleNode current = front; while (current != null) { System.out.println(current.getInfo()); current = current.getNext(); } }
public void printReverse() { System.out.println("List from end to front"); DoubleNode current = rear; while (current != null) { System.out.println(current.getInfo()); current = current.getBack(); } }
public LinkedList
LinkedList
return list; }
}
MyDoubleLinkedList class
Exercise #2 Answer the following Question: 1. Given the following class public class DoubleNode private object info=null; private DoubleNode next=null; private DoubleNode back=null; 3 2. Complete the class DoubleNode by adding the necessary methods. 3. Create a class my Double Linkedlist similar to myLinkedList (created in the lecture) This class should have at least the following methods inserAtEronto. removeAtEconto print and printReverse Write a method that create a linked list from a double linked list using the methods available in myDoublelinkedlist and java.util.Linkedilist 4 5. Create a class named "Car" which has the following fields. The fields correspond to the columns in the text file except the last one. i Vehicle Name String 11. Engine Number String 1/2 Vehicle Price double IV. Profit double V. Total Price double (Total Price = Vehicle Price + Vehicle Price Profit/100) b) In Test class, write a method named showCat (myDoublelinkedlist list, String Numbet) takes the list and Engine Number as parameters, and displays all the information of the particular.cat including Total Price. -) In Test class, write the main method (in Test class) to 1 Create my Doublelinkeslist list 2. Read the content of the text file and for each row an instance of the class Car is created with the calculated Total Price (use My Doublxlinkedlist of objects) and add each instance list (in b.1). 3 Test the method showCaro 4. Test the methods written in max DoublelinkedlistStep 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