subject

Two programs. Submit the source files, the captured run of the first, and both of the data files for the second. 1. Create a struct Menultem containing fields for name (a string) and price (a double) of a menu item for a diner. Create a ReadItem() function that takes an istream and a Menultem (both by reference) and prompts the user for the fields of the MenuItem, loading the values into the struct's fields. Create a PrintItem() function that takes an output stream (by reference) and a Menultem (by value) and prints the MenuItem fields to the stream in a reasonable one-line format. Create a main() that declares a Menultem struct locally, calls ReadItem(), then calls PrintItem(). Test with a few different items.
2. Make another program modified to include an array of 10 MenuItem structs. Modify ReadItem() to not prompt for, but instead just read the data for a struct field-by-field, and call it once for each Menultem. Then call PrintItem() for cach struct, numbering the items to create a menu (see below). Use files, opened and closed in main(), for all input and output. Create a test file with the 10 items and prices, and test with it. Send me the test file and the output file. (30 points) Hints: If you use an istream & for an input stream parameter, you may pass either cin or an input file handle to a function.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:50
Can online classes such as gradpoint track your ip location like if im taking a final and i give somebody else my account and they take the final for me will it show where they are taking the final from? and can this be countered with a vpn
Answers: 1
question
Computers and Technology, 22.06.2019 15:20
The north and south regions had very diferent economies in the 1800s.
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
question
Computers and Technology, 23.06.2019 22:30
Apart from confidential information, what other information does nda to outline? ndas not only outline confidential information, but they also enable you to outline .
Answers: 1
You know the right answer?
Two programs. Submit the source files, the captured run of the first, and both of the data files for...
Questions
question
Mathematics, 09.04.2020 02:23
question
Mathematics, 09.04.2020 02:23
question
Mathematics, 09.04.2020 02:23
Questions on the website: 13722361