Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java language in NetBeans Exercise #2. Answer the following Question: 1. Given the following class public class DoubleNode { private Object info=null; private DoubleNode

In java language in NetBeans

image text in transcribed

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; ....................... 2. Complete the class Double Node by adding the necessary methods. 3. Create a class mxDouble LinkedList similar to moxLinked List (created in the lecture). This class should have at least the following methods: inser at Fronto, removeatfronto, print, and printReverse(). Write a method that create a linked list from a double linked list using the methods available in mxDouble Linkedlist and java.util.Linkedil ist. 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. 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 ii. Engine Number : String iii. 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 showCar (myDoubleLinked List list, String eNumber) takes the list and Engine Number as parameters, and displays all the information of the particular car including Total Price. c) In Test class, write the main method in Test class) to: 1. Create pox Double LinkedList 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 array of objects) and add each instance list (in b.1). 3. Test the method sbow Card) 4. Test the methods written in mx Doublelinkedlist. 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; ....................... 2. Complete the class Double Node by adding the necessary methods. 3. Create a class mxDouble LinkedList similar to moxLinked List (created in the lecture). This class should have at least the following methods: inser at Fronto, removeatfronto, print, and printReverse(). Write a method that create a linked list from a double linked list using the methods available in mxDouble Linkedlist and java.util.Linkedil ist. 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. 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 ii. Engine Number : String iii. 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 showCar (myDoubleLinked List list, String eNumber) takes the list and Engine Number as parameters, and displays all the information of the particular car including Total Price. c) In Test class, write the main method in Test class) to: 1. Create pox Double LinkedList 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 array of objects) and add each instance list (in b.1). 3. Test the method sbow Card) 4. Test the methods written in mx Doublelinkedlist

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

A Complete Guide To Data Science Essentials

Authors: Miguel

1st Edition

9358684992, 978-9358684995

More Books

Students also viewed these Databases questions

Question

What do we know about thinking in other species?

Answered: 1 week ago

Question

2. What are your challenges in the creative process?

Answered: 1 week ago