Answered step by step
Verified Expert Solution
Question
1 Approved Answer
6 4 6 Chapter 1 1 : Records ( structs ) Student data should be stored in a struct variable of types which has four
Chapter : Records structs Student data should be stored in a struct variable of types which has four components: student FName and student string, test Score of type int test Score is between grade of type char. Suppose that the class has students. Use components of type studentType. Your program must contain at least the following functions A function to read the students' data into the array A function to assign the relevant grade to each student A function to find the highest test score. A function to print the names of the students having the score Your program must output each student's name in this form followed by a comma, followed by a space, followed by the first name must be left justified. Moreover, other than declaring the var opening the input and output files, the function main should collection of function calls. Define a struct, menuItem type, with two components mente type string and menu Price of type double. Write a program to help a local restaurant automate its breakfast system. The program should do the following # Show the customer the different breakfast items offered by the rest Allow the customer to select more than one item from the me Calculate and print the bill. Assume that the restaurant offers the following breakfast items the of each item is shown to the right of the item: $ $ $ Plain Egg Bacon and Egg Muffin French Toast Fruit Basket Cereal Coffee Tea $ $ $ $ Use an array, menulist, of the struct menuItem Type, as defined Programming Exercise Your programmust contain at least following functions Function getData: This function loads the data into the array Benutit. Function show enu: This function shows the different items offered by the restaurant and tells the user how to select the items Programming Emiss Function printcheck: This function calculates and prints the check. Note that the billing amount should include a tax. A sample output is: Welcome to Johnny's Restaurant Bacon and Egg $ Muffin $ Coffee $ Tax $ Amount Due $ Format your output with two decimal places. The name of each item in the output must be left justified. You may assume that the user selects only one item of a particular type. Redo Exercise so that the customer can select multiple items of a particular type. A sample output in this case is: Welcome to Johnny's Restaurant Bacon and Egg $ Muffin Coffee $ $ Amount Due $ & Write a program whose main function is merely a collection of variable declarations and function calls. This program reads a text and outputs the letters, together with their counts, as explained below in the function printResult. There can be no pohal variables! All information must be passed in and out of the functions. Use a structure to store the informa tron. Your program must consist of at least the following functions: Function openPle: Opens the input and output files. You must pass the file streams as parameters by reference, of course If the file does not exist, the program should print an appropriate message and exit. The program must ask the user for the names of the input and output files. Function count: Counts every occurrence of capital letters AZ and small letters az in the text file opened in the function openPile. This information must so into an array of structures. The array must be passed as a parameter, and the file identifier must also be passed as a parameter Function print Result: Prints the number of capital letters and small letters, as well as the percentage of capital letters for every letter AZ and the percentage of small letters for every letter a The percentages should look like this: This information must come from an array of structures, and this array must be passed as a parameter,
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