Description

In this assignment, you will implement a number of small programs. Here, you will:

  • use dynamic memory allocation, pointers, and references.
  • implement a list
  • implement a class in multiple files
  • use operator overloading

Implementation Instructions

We provide a template for source files that you must use. You will find the files in the directory src/ which contains:

  • a .cpp file for the implementation of linked list
  • a .h file for the declaration of the linked list
  • a main.cpp file to test the code

You will write your code inside the provided source files.

You will submit:

1. only the source files (i.e., .cpp and .h files) and the associated Makefile. Do not submit .o files, executables, or test datasets.

2. files at point 1 (i.e. .cpp and .h files must be in the src directory compressed in the src.tar.gz file.

To compress the src directory, move to its parent directory (i.e. if you are inside src type cd ..), then type the following command on the linux terminal:

tar zcvf src . tar . gz src

Questions

1. Linked List

In this question you will implement a class LinkedList with an interface similar to java LinkedList (cfr. http://docs.oracle.com/javase/7/docs/api/java/util/LinkedList. html).

The type the list will hold T (a very special type...or maybe not), along with the class interface are specified in the header file linked_list.h. In the header you will also find documentation in javadoc format (that may help you understanding some details even if you do not know Java) for each of those elements.

You will implement the class methods in the file linked_list.cpp.

main.cpp implements the Main() function which create an object of type LinkedList and calls its methods to operate on the list for debugging and grading purpose, so you are not allowed to modify it.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.