SENG1120 Assignment1-infrastructure to manipulate data related to text Solved

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (1 vote)

You are required to build the infrastructure to manipulate data related to text. Your client further specifies that you are to create a class named LinkedList to store individual tokens. The LinkedList will store each token in a Node of the list, using the class string.

ASSIGNMENT TASK

You are required to use a doubly-linked list, as discussed in lectures, to create your own implementation of the LinkedList class. It will use instances of Node to store instances of value_type (in this assignment, each Node will be used to store an instance of string).

The LinkedList class will be used by a main program, to be supplied to you, as well as a makefile. You will need to design LinkedList and Node in a way that it communicates seamlessly with the main program and compiles with the makefile also supplied. Please refer to the lecture slides and recordings for guidance on how to implement both classes.

You will need to implement constructors, overloaded operators, and a method that sorts the content of the linked list. You can use any sorting algorithm, but we recommend bubble sort. It is not efficient, but is very easy to implement (https://www.geeksforgeeks.org/bubble-sort/).

 

For students in SENG6120, there is an extra requirement: 

  • (3.0 marks) Extend the member method void remove(string) inside LinkedList. The extended method removes all occurrences of an input sentence. For instance, if the linked list contains

the sentence “The black cat was sitting on the black mat that was on the black floor”, and the input string for remove(string) is “on the black”, then the resulting linked list must be “The black cat was sitting mat that was floor”.

  • SENG1120_A1-hhdkcd.zip