Assignment (part a)
Create a Checkbook program using C :
• Create a Check structure. Include:
o Check number (should be an integer).
o Date (use type char[ ]).
o To
o Amount
o Description
• Add functions to:
o Add a Check. Collect all information for a single check and return the check. Should not take any parameters. Gather all data in the function from the user. Call the function to display the values for the check before returning the Check.
o Display the values for a single check. Format the amount for two decimal places.
o Display the values for the entire checkbook, one check at a time.
• In the main function:
o Create a checkbook. It should be an array of at least size ten.
o Repeat until the checkbook is full or the user quits. Give the user these options:
- Add a check.
- Display the checkbook.
- Quit.
• Compile and run your code.
Assignment (part b)
Alter the Checkbook program from part a using C
• Create a Check node structure. Include:
o Check number (should be an integer).
o Date (use type char[ ]).
o To
o Amount
o Description
o Pointer to the next Check node
• Add functions to:
o Add a Check to the checkbook. Collect all information for a single check and add it to the checkbook. Call the function to display the values for the check before adding the check.
o Delete a check from the checkbook. Use the check number to identify the check to be deleted.
o Display the values for a single check. Format the amount for two decimal places.
o Display the values for the entire checkbook, one check at a time.
• In the main function:
o Create a checkbook. It should be a linked list.
o Repeat until the user quits. Give the user these options:
- Add a check.
- Delete a check.
- Display the checkbook.
- Quit.
• Compile and run your code.