Linked list program

Assignment Help C/C++ Programming
Reference no: EM13500110

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.

Reference no: EM13500110

Questions Cloud

Prepare and describe each incorrect assumption : Prepare and describe each incorrect assumption, statement and/are inappropriate application in the above procedures
Prepare the entry to record the interest expense : (a) Prepare the entry to record the interest expense at April 1, 2015. Assume that interest payable was credited when the bonds were issued (round to nearest dollar).
Determine the maturity date : Determine the maturity date, interest at maturity, and maturity value for each of the following notes.
Find the work function of cesium : When light of wavelength 380 nm falls on a cesium surface,electrons are emitted that have a maximum kinetic energy of 1.13eV. Find the work function of cesium
Linked list program : This lab, along with your TA, will help you navigate through designing, implementing, and testing a dynamic linked list.  Linked lists may be used to implement many real world applications. Recall, linked lists are data structures, which represent co..
Global and domestic retail markets influenced profitability : Examine how at least three (3) growth strategy alternatives utilized by Amazon.com in the global and domestic retail markets influenced profitability, and indicate if the strategies were successful.
Determine the length of the pendulum rod : A grandfather clock is controlled by a swinging brass pendulum that is 1.2 m long at a temperature of 21°C. What is the length of the pendulum rod
What is the stopping distance of the object : an object with a mass of .40 kg moving with a speed of 25 m/s is brought to rest after sliding on a rough surface. What is the stopping distance of the object
Evaluate the world anti doping agency regulatory regime : Evaluate the World Anti Doping Agency (WADA) regulatory regime using three ethical principles of the Global Business Standards Codex.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  The rpn calculator program

The RPN calculator program should read the RPN expression as an entire line from stdin.Input will consist of a single line. After completing the evaluation of the expression, the program should print the contents of the entire stack, starting with th..

  Writer a program that allows the user to enter

Writer a program that allows the user to enter an unknown number of characters, stores those characters in a data structure (a vector) and then prints the values to the screen.

  Stores a series of numbers in a binary tree.

Queue Converter, Write a program that stores a series of numbers in a binary tree. Then have the program insert the values into a queue in ascending order. Dequeue the values and display them on the screen to confirm that they were stored in the prop..

  Task 1 fill out surveyplease take the 122223 survey at

task 1 fill out surveyplease take the 122223 survey at survey.osble.orgindex.php?sid97282. please treat the question

  Consider an l1 cache with an access time of 1 ns

Suppose that we can change the cache design (size of cache, cache organization) such that we increase H to 0.97, but increase access time to 1.5 ns. What conditions must be met for this change to result in improved performance?

  Calculates the factorial value of its single int parameter

Write a method called fact that recursively calculates the factorial value of its single int parameter.

  Implement method to advance any given date by one day

Write C++ implementation of this method. Create and specify any other methods that you require. Include comments which will be helpful to someone who will maintain implementation in the future.

  Variables should be private and the class functions public

All the class variables should be private and the class functions public. The class functions should be implemented in a file Inventory.cpp which should be linked with the inventory.hpp file.

  Write a program that will read in 4 test scores per line

Write a program that will read in 4 test scores per line. Print the total number of points earned, your program should work for any number of lines of data.

  Write a recursive definition in sml to reverse

Write a recursive definition in SML to reverse a list of elements and multiply all elements with 2.

  Calculates the student * averages and quiz averages based

Calculates the student * averages and quiz averages based upon input from the user. Modify this program to read in the following grade text file, * with a maximum number of students set to 35 and having five quiz scores for each student. The output s..

  Write a c++ program that asks the user for a radius r

Write a c++ program that asks the user for a radius r. The program must include a function called calcwradius that accepts the value of the radius r, and calls the function pi shown below.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd