This lab along with your ta will help you navigate through


Overview & Requirements:

This lab, along with your TA, will help you navigate through designing, implementing, and testing a dynamic linked list.

Labs are held in a "closed" environment such that you may ask your TA questions. Please use your TAs knowledge to your advantage. You are required to move at the pace set forth by your TA. Please help other students in need when you are finished with a task. You may work in pairs if you wish. However, I encourage you to compose your own solution to each problem. Have a great time! Labs are a vital part to your education in CptS 122 so work diligently.

Tasks:

1.   Linked lists may be used to implement many real world applications. Recall, linked lists are data structures, which represent collections of nodes that may be accessed sequentially via a pointer to the first node. A node contains data and a pointer to the next node in sequence. When the last node in the list is reached, its next pointer is NULL. A logical view of a singly linked list of integers is illustrated below:

42 |  ------------->  100 |  ------------------> 235 | ----------->

Build an application, in C, for storing contact information (you must have one header file and two source files). For each contact you must store a name, phone number, email, and professional title. Your application must support insertions in order (based on last name), deletions, modifications, and printings of contacts. For this task you will be required to implement a dynamic singly linked list, which grows and shrinks at runtime. Build a menu that allows the user to add, remove, edit, print, store, and load contact information. The store feature should write contact information found in the list to a file. Theload feature should read contact information from the same file into the list. Note: you should store the contact information n a struct called Contact. Each Node must be a struct, which consists of a Contact and a pointer to the next Contact in the list.

2.   Test your application. In the same project, create one more header file testList.h and source file testList.c (for a total of at least five files). ThetestList.h file should contain function prototypes for test functions you will use on your list functions. The testList.c source file should contain the implementations for these test functions. You will be designing and implementing unit tests. You will have at least one test function per application function. Your test functions must display a message "test failed" or "test passed" depending on the results. For example, you will have an application function called deleteNode() (or a function very similar) that was used to remove contact information from the list. In this task, you will need to create a test function called testDeleteNode() that passes in various contact information directly into deleteNode() to see if it works correctly.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: This lab along with your ta will help you navigate through
Reference No:- TGS0768047

Now Priced at $40 (50% Discount)

Recommended (95%)

Rated (4.7/5)