Casestudy:
Inthis assessment you are required to develop a to-do list applicationin C++. The list must be implemented by linked list. A linked list isa linear data structure, in which the elements are not stored atcontiguous memory locations. The elements in a linked list are linkedusing pointers as shown in the below image:
Eachelement in the link is called a node which is composed of two parts:
Datastored by the node
Linkpointed to the next node in the linked list
Thefinal application must meet the following functional requirements:
Theuser can create unlimited to-do lists. Each list must have a uniquename (i.e., two lists with same name are not allowed).
Usercan insert a new list at the start and delete the first list.
Usercan insert an item in a list specified by the user. User inputs thename of the list to insert the item. If the list exists, then theuser has the option to either insert the item at the end of the listor after an item at an index specified by the user. If the list doesnot exist an appropriate message is shown.
Usercan delete an item from a list specified by the user. User inputsthe name of the list to insert the item. If the list exists, thenthe user is prompted to enter the index of the item to delete. Ifthe list does not exist an appropriate message is shown.
Usercan see the names of stored lists.
Usermust be able to display the items stored in a to-do list specifiedby the user.
Theto-do list has the following functional requirements:
Eachnode in the list stores a string that is entered by the user. Thestored string describes the user task.
Theremust be a way to delete last item from the list.
Theremust be a way to insert an item at the end of the list.
Theremust be a way to insert and delete an item at a specific index. Youcan assume that the first item in the list has an index 0.
Pleasenote to score maximum marks you must implement all the requirements.However, you can still obtain a maximum of 70% marks if yourapplication allows users to create only a single to-do list.
Thefollowing reference sites can be of helpful to enhance yourunderstanding of Linked List class structure based on Node andassociated methods:
https://www.geeksforgeeks.org/data-structures/linked-list/
https://www.freecodecamp.org/news/data-structures-explained-with-examples-linked-list/
https://beginnersbook.com/2013/12/linkedlist-in-java-with-example/
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here