Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write pseudo code and test cases: PROMPT : About - The file contains a header and then a list of people (unique first names)

Please write pseudo code and test cases:

image text in transcribed

image text in transcribed

PROMPT : About - The file contains a header and then a list of people (unique first names) waiting in line at a restaurant with an integer indicating how much money they will spend at this restaurant. The first line represents the first person to be served (i.e., the front of the line), while the last line represents the last person to be served (back of the line). The values are separated by spaces. As you work through the problem state any assumptions. File reading - Read the data in. Store the header in a string (will not be needed), Store the data on each line in a container of structs. Process/Calculations - 1. Calculate the total amount of money the restaurant will make from serving this line of customers. 2. If the restaurant is closing soon but wants to make at least \$30 more, write a code that can determine the least amount of people to serve while still making at least $30. Please do this calculation after the container is already filled, and the file has been closed. You may use additional containers if you'd like. Creative component (if time permits) - create one cin and one cout for this problem. Make sure your code uses the cin. People in line: Anahi 5 Ricardo 2 Isaiah 3 Ashley 10 Alex 9 Besher 13 Roman 9 Aston 1 Allison 5 Nick 4 Corrine 10 Aleena 6 Emilia 3 Claire 5 Summer 11 Sara 6 Matt 9 Luke 4 Jeff 5 Lucas 10 Rogelio 3

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions