Question
C++ Help Program Input The input to the program will be the tracking number of the animal, the type of animal boarded, and the daily
C++ Help
Program Input
The input to the program will be the tracking number of the animal, the type of animal boarded, and the daily boarding charge for the animal.
The following input should be used to test your program:
Tracking Number | Type of Animal | Daily Boarding Charge |
---|---|---|
10001 | Black and Tan Miniature Dachshund | 75.50 |
20001 | Siamese Cat | 50.00 |
30001 | Shetland Pony | 250.75 |
40001 | Tortoise | 15.00 |
50001 | Chocolate Ranchu | 4.75 |
The program should prompt the user for the input data. When the input of an item has been completed, a prompt for additional items for entry should be posted. If the user chooses to enter additional items, the prompts for input data should appear once again. If the user chooses to end the data entry, the program should display the items entered (no sorting of the data is required).
Output
Prepare a listing of the animals with appropriate column headings. Align the data neatly within columns. This listing should include the following:
the tracking number of the animal
the type of animal boarded
the daily boarding charge for the animal (formatted to two decimal places)
Processing
You must use a structure which includes the following elements:
the tracking number of the animal integer
the type of animal boarded character array
the daily boarding charge for the animal double
pointer to next record pointer
One global variable may be used. This variable should represent a pointer to the head of the linked list.
Two functions should be included to perform the following:
insert an item into a linked list;
display the values of all of the members of the list to the monitor (as described in the output section);
Create a program that prompts the user to enter the required data (as described in the input section). Once the data has been entered for an item, the appropriate function should be called to insert the item at the head position of a linked list. The prompts for data should be placed inside a while loop which asks the user for additional items to be entered. Once the data entry is completed, the appropriate function should be called to display the data in a formatted manner to the monitor.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started