Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a new Java Application to manage Linked Lists: (Note: Do not use java.util.LinkedList) a) Create a DateTime class 1. Add day, month, year, hours,

Create a new Java Application to manage Linked Lists: (Note: Do not use java.util.LinkedList) a)

Create a DateTime class

1. Add day, month, year, hours, minutes as attributes

2. Add a constructor and a toString() method

3. Implement the Comparable interface, and add a CompareTo() method

4. Add methods to get and set all attributes.

b) Add to MyLinkedList class the following methods:

1. Insert a Node to a particular position in the List

2. Insert a Node in place, assuming that the list is ordered in ascending order.

3. Delete node in front

4. Delete last node

5. Delete a node given its position

6. Method to find the node with the minimum value in the list getMinimum()

7. Method to merge two lists together and return the resulting linked list

8. Sort list in ascending order

9. Sort list in descending order

c) Create a Test3 class to do the following in the main method:

1. Create a new List (call it dateTimeList) of type MyLinkedList

2. Insert five DateTime objects numbers to a specific position in the list (not ordered).

3. Display all the DateTime objects in the List

4. Display the DateTime objects occurring after today

5. Insert a new DateTime elements to its appropriate position in the List and display it

6. Sort the List and display it in both ascending and descending

7. Display the smallest and the largest elements in the list

8. Display all DateTime objects with the time in the afternoon

9. Delete a DateTime object from the front of the list

10. Delete a DateTime object from the back of the list

11. Create two lists of DateTime objects, merge them together, and then print the resulting merged list.

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

Intelligent Information And Database Systems Second International Conference Acids Hue City Vietnam March 2010 Proceedings Part 1 Lnai 5990

Authors: Manh Thanh Le ,Jerzy Swiatek ,Ngoc Thanh Nguyen

2010th Edition

3642121446, 978-3642121449

More Books

Students also viewed these Databases questions

Question

What risks do you feel P&G will face going forward?

Answered: 1 week ago

Question

How do books become world of wonder?

Answered: 1 week ago

Question

If ( A^2 - A + I = 0 ), then inverse of matrix ( A ) is?

Answered: 1 week ago

Question

1. Write down two or three of your greatest strengths.

Answered: 1 week ago

Question

What roles have these individuals played in your life?

Answered: 1 week ago

Question

2. Write two or three of your greatest weaknesses.

Answered: 1 week ago