Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment, you will implement a generic ordered SortedLinkedList class based upon the generic LinkedList class of your design. The use of a framework

In this assignment, you will implement a generic ordered SortedLinkedList class based upon the generic LinkedList class of your design. The use of a framework or third-party packages is prohibited. You can either utilize inheritance or composition in your implementation.

The class must support a single Add method that accepts a single generic parameter as shown in the signature below. This parameter will be inserted into the list in its proper sequence (dictionary order, case-insensitive). public void Add(T element)

There are four conditions that must be handled in your insert method:

1. The list is empty

2. The new element is smaller than the first element

3. The new element is larger than the last element

4. The new element is larger than the first element and smaller than the last element

Demonstrate that your class is functional by creating an ordered list of integers, adding the test data (given below), and iterating over the list to display the contents of the list (in node order).

Integer data: 7, 6, 10, 15, 4, 0, 10, -5, 3, 11, 6, 3, 0, 1, and 8.

You may use C# to implement this program as long as the following requirements are met. A C# project must be created in Visual Studio 2017. The entire project must be submitted as a single ZIP file that contains the project folder, source code, and documentation.

Grading:

A Generic Sorted Linked List class Possible Score Comment A class called SortedLinkedList exists in the project 10

The SortedLinkedList class is generic 15

The SortedLinkedList class implements the proper constraints on the type parameter 10

An Add method exists that matches the following signature public void Add(T element) 15

The SortedLinkedList class handles condition #1 above 20

The SortedLinkedList class handles condition #2 above 20

The SortedLinkedList class handles condition #3 above 20

The SortedLinkedList class handles condition #4 above 20

The program demonstrates functionality using the supplied data. 20

The program does not utilize a sorting routine of any kind other than an algorithm based upon the four conditions for handling an insert. 50

Total 200

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

Step: 3

blur-text-image

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago