Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ language. Please do not leave any question incomplete.. I have posted it as one out of the three parts of the same assignment.. so

C++ language.
Please do not leave any question incomplete.. I have posted it as one out of the three parts of the same assignment.. so I expect it to be completed and not left undone as always..
thank you
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Duckey Donald 85 Goof Goofy 89 Brave Balto 93 Snow Smitn 93 Alice Wonderful 89 Samina Akthar 85 Simba Green 95 Donald Egger 90 Brown Deer 86 Johny Jackson 95 Greg Gupta 75 Samuel Happy 80 Danny Arora 80 Sleepy June 70 Amy Cheng 83 Shelly Malik 95 Chelsea Tomek 95 Angela Clodfelter 95 Allison Nields 95 Lance Norman 88 Plain Egg 1.45 Bacon and Egg 2.45 Muffin 0.99 French Toast 1.99 Fruit Basket 2.49 Cereal 0.69 Coffee 0.50 Tea Exercises 1. Write a program that reads (from a file) students' names followed by their test scores. The program should output each student's name followed by the test scores and the relevant grade. It should also find and print the highest test score and the name of the students having the highest test score. Student data should be stored in a struct Variable of type studentType, which has four components: studentName and student Name of type string, testScore of type int (testScore is between 0 and 100), and grade of type char. Your program must contain at least the following functions: A function to read the students' data into the array. b. A function to assign the relevant grade to each student. . A function to find the highest test score. d. A function to print the names of the students having the highest test score. Your program must output cach student's name in this form: last name followed by a comma, followed by a space, followed by the first name; the name must be left justified. Moreover, other than declaring the variables and opening the input and output files, the function main should only be a collection of function calls. a 2. Write a program to help a local restaurant automate its breakfast billing system. The program should do the following: Show the customer the different breakfast items offered by the restaurant b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill. Assume that the restaurant offers the following breakfast items (the price of each item is shown to the right of the item): Plain Egg $1.45 Bacon and Egg $2.45 Muffin $0.99 French Toast $1.99 Fruit Basket $2.49 Cereal $0.69 Coffee $0.50 Tea S0.75 Use an array menulist of structure type menultemType, whereas the structure menultem Type has with two components: menultem of type string and menuPrice of type double. Your program must contain at least the following functions: Function getData: This function loads the data into the array menulist Function showMenu: This function shows the different items offered by the restaurant and tells the user how to select the items 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 Dr. Naveed Bin Rais COE212 - Programming for Engineers II Bacon and Egg $2.45 Muffin $0.99 Coffee $0.50 Tax S0.20 Amount Duc $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

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

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

1. Describe a dialectical approach to cultural transitions.

Answered: 1 week ago