Answered step by step
Verified Expert Solution
Link Copied!

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

646 Chapter 11: 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 20 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): 4 $1.45 $2.45 $0.99 Plain Egg Bacon and Egg Muffin French Toast Fruit Basket Cereal Coffee Tea $2.49 $0.69 $0.50 $0.75 Use an array, menulist, of the struct menuItem Type, as defined Programming Exercise 2. 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 /647 Function printcheck: This function calculates and prints the check. (Note that the billing amount should include a 5% tax.) A sample output is: Welcome to Johnny's Restaurant Bacon and Egg $2.45 Muffin $0.99 Coffee $0.50 Tax $0.20 Amount Due $4.14 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 4 so that the customer can select multiple items of a particular type. A sample output in this case is: Welcome to Johnny's Restaurant 1 Bacon and Egg $2.452 Muffin 91.98 Coffee $0.50 $0.25 Amount Due $5.18 & 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 A-Z and small letters a-z 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 A-Z and the percentage of small letters for every letter a- The percentages should look like this: "250". 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions

Question

If you believe it is not ethical to import such merchandise:

Answered: 1 week ago

Question

2. Define communication.

Answered: 1 week ago