Question: i need help with this in programming c Intro to Programming in C large program 4 -list.c With this assignment you will start to leam
Intro to Programming in C large program 4 -list.c With this assignment you will start to leam how to write a practical menu driven program that manages a list of data. You will use an array of structs to organize the data and you will save the infomation in a text file. The focus (topic) of your program is up to you Suggested topics: students, athletes, music, books, games, ears, etc. The Menu commands must include: (1) . .Print the list onto the screen .Add a new entry 3)..Clear all records 4).Create a current report (save it to a file) 5). .Delete an item from the list (6) Update ONE OF THE FIELDS (not THE 1)Quit You will use structs and an array to organize the data in the program. Your struct must contain at least the following kinds of infomation: o 2 strings (character arrays)- Suggestions include: item name, manufacturer, etc o 3 integers- I must be product id (unique for each item in the list) Suggestions include: Product id, qty in stock, count o Minimum of 2 double values Suggestions include:cost, price, average quantity . . When you add new item the program will ask the user for each of the ficlds on a separate line When you delete an item from the list the program will ask you for the integer (id) of the entry to be deleted, locate the entry in the array and remove all of the data for that entry - The list does not need to be sorted- to remove an entry, you may move the last item in the list to the location of the deleted entry When you display the records on the screen, all of the information stored for cach entry will be labeled and displayed. Creating a current report copies the current entries in the array to an output file. This must include labeling all of the information so that it is clear what information is being provided. . Instructions . You should use at least the 10 user defined functions described below (plus main) to appropriately break the problem up into smaller pieces. . Your program must start up with at least 8 valid reoords. These records must be "hard coded"in your program file. (This must be done in one of your user-defined functions) . You should use function peototypes and NO GLOBAL VARIABLES (penalty) You should use a define to set the upper bound of the list to 50 entries. Your code should be well designed, well commented and written with good style. Start work on this as soon as possible. . Instructions . You should use at least the 10 user-defined functions described helow (plus main) to appropriately . Your program must start up with at least 8 valid records. These records must be "hard codedin break the problem up into smaller pieces. your program file. (This must be done in one of your user-defined functions) You should use function prototypes and NO GLOBAL VARIABLES (penalty) . * You should use a #define to set the upper bound ofthe list to 50 entries. .Your code should be well designed, well commented and written with good style. .Start work on this as soon as possible. . It is your responsibility to request this help in the form of specific questions . When you ask a question, it should be specifis, and you should provide me with the current version of your program. The current version of your program should be neatly formatted and commented. It should also be properly indented and use meaningful variable and function names. This will make it easier for anyone helping you to understand what you are trying to do. . NOTE: there will be no guarantee of assistance with this assignment on the last few days before it's due so DON T leave this assignment to the last minute Function descriptions: 1. Greets the user 2. I/hardcode eight (8) valid records . /runs the menu and gets the user choice 4. //prints the contents of the 1ist onto the screen 5. //adds an item to the list 6. //prints a report to a file /"declare the file pointer, connect to the file called "report.txt and close the file pointer all inside this function*/ . displays the ids in the list, gets the id from the user and returns st 8. //searches te list by d and returns the index, if there is a match or retums iee if there is no satch (the maximum size of the 1ist is se) /Ithree argunents: list, number of items, id 9. //renoves an item from the list //takes three arguments, the list, the number of itens and the location that was //returned by the search function 18. /fupdates an item in the list //takes two arguments, the list and the location that was /Freturned by the search function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
