Program 1 -- Two Different Linked Lists


Your task is to make a program that implements a singly linked list.

Input:  I will provide a file as shown below.  For every line with an 'a', add that item.  If the item exists, add it again.  For every line with a 'd', delete that item.    For every line with a 'c', check to see if that item exists or not. 

a 1
a 20
a 100
d 2
d 1
d 99
d 100
d 10
c 1
c

Output:  You should output the phrase "Item XXX added.", "Item XXX deleted.", and "Item XXX not deleted.", "Item XXX found." and"Item XXX not found."  You must get the spelling, punctuation, and spaces exactly as shown below.

Item 1 added.
Item 20 added.
Item 100 added.
Item 2 not deleted.
Item 1 deleted.
Item 99 not deleted.
Item 100 deleted.
Item 10 not deleted.
Item 1 not found.
Item 20 found.

Scoring:
Points
Task
1
Implements a constructor
1
Implements a destructure that frees all RAM.
1
Implements a void add(int item) method.
1
Implements a void delete(int item) method
1
Implements a bool contains(int item) method.
-2
Turned in after Tuesday Jan 20th.
-2
Turned in after Thursday Jan 23th.