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

  Write a c program to search a list of integers

Write a C program to search a list of integers for a particular value. The user should be prompted to enter the value to be searched for. Your program will then print out whether the value was found or not.

  Atm system code two classes with related attributes

Related to ATM system code two classes with realted attributes and operations!in C++

  Using array subscript notation

Using array subscript notation, base/offset notation with the array name as the pointer, array notation with  vPtr , and pointer/offset notation with  vPtr , add 3 to the value in the 3 rd element and display that number. (Do not modify the value in ..

  Develop classes describing various types of buildings

Describe how inheritance might be used to develop classes describing various types of buildings.

  Write a program that sorts a linked list

Write a program that sorts a linked list of integers using merge sort. the program will read the integers froma file onto a linked list and then sort the linked list using MERGE SORT. this will require additional linked lists but you should use li..

  Write two short c programs and solve exam-style problem

Write two short C programs and solve four exam-style problems.

  Calculate that implements a simple arithmetic calculator

Write a  C program  calc.c that implements a simple arithmetic calculator. Input to the calculator consists of lines composed of integer constants separated by the five arithmetic operators used in C: +, -, *, /, and %. For each line of input,

  Program to tell you how many months it will take to pay off

write a program to tell you how many months it will take to pay off any loan, as well as the total amount of interest paid over the life of the loan.

  Write programme that allows a user to enter distinct words

Write a programme that allows a user to enter three distinct words and returns them as a single string

  Prepare a program to print the permutation

write a program to print the permutation that lexicographically precedes the given input permutation. If the given permutation is the lexicographically least permutation, then print the input permutation itself.

  Create a customer profile class.

a. Create a CustomerProfile class. Each CustomerProfile contains a last name, phone number, and bit fields indicating whether the customer:

  Struct definition to represent the data of a person''s bank

Define a struct definition to represent the data of a person's bank account. There will be one string for the name, and two doubles for balance and interest rate. Declare two variables of this new type in the main function. Modify the values of each ..

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