subject

There are two prompts below. for the first prompt, you will be implementing a stack and for the secondprompt you will be implementing a queue. you will be creating functions only.0 points if you do not do the following: 1. you must implement one prompt using an array (using a struct-refer to classcode) and the other using alinked list.2. all functions dealing with operations on the stack and queue (like push, pop, enqueue, is_full etc) shouldbe kept in the stack_queue7 files. these operations should be called in your functions created below. feelfree to modify operation functions given in class or create your own.3. all functions created for the prompts (four below) should be kept in the hw7 files. prompt 1 (40 points): jameel works at a restaurant where all servers put their tips into a tip jar for the night. at the end of thenight, each server gets two dollars for each hour they worked. a) function 1: create a function that allows users (servers in this case) to continuously enter tips made until eitherthe stack is at full capacity or the word done is entered (meaning the night is over). the tip jar shouldbe implemented as a stack. choose any parameters and return values you find necessary. a possible function run might look like: ***tip jar***enter tip: $15.95enter tip: $5.00enter tip: $10.50enter tip: doneb) function 2create a function that calculates the amount the user makes. choose any parameters and return values……you find necessary. a possible function run might look like: hello, how many hours did you work? 6ok, giving you $12.***tip jar (updated)***enter tip: $15.95enter tip: $3.50 /*notice the leftover money is put back in the tip jar*/prompt 2 (40 points): natalya works at an airline counter. all the customers she deals with for the day are kept in a file in theformat first name, last name, flight number (for example: jon, doe,3434). you may find it useful to create asample file to test your program. the list of all customers and their corresponding flight numbers shouldbe implemented as a queue. a) function 3create a function that reads in file info into a queue (assume that the number of lines in the file is….always less than the capacity of the queue). the first and last name should be held in a pointer called….full_name and the flight number should be held as an int. choose any parameters and return values you….find necessary. a possible function run might look like: --adding in customer info from file: jon doe – 3434jane doe – 3434bob doe – 8934bill doe – 1234don doe – 9393frank doe – 1234all customer info added. b) function 4create a function that allows the user to check which customers are taking a specific flight (the flight… you are checking should be a parameter to the function). the customers taking this flight……should be printed to screen and placed into a file (see below). choose any additional parameters and……return values you find necessary. a possible function run might look like: --passengers for 1234: bill doe is taking flight 1234. /*notice bill doe is handled first since we are dealing with a queue*/frank doe is taking flight 1234.(the output file should contain the same information printed to screen).do not forget to indent (10 points) and includecomments (10 points).

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:30
After you clean an engine with hot water spray, it seems to stall; when it doesn't stall, it's idling noisily. technician a says to check for loose bolts on the flex plate near the torque converter. technician b says to wipe down the spark plug wires and the distributor cap. who is correct? a. technician a b. both technicians a and b c. technician b
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
Who introduced the concept of combining artificial and natural light in the studio
Answers: 1
question
Computers and Technology, 24.06.2019 18:00
Explain the circumstances for which the interquartile range is the preferred measure of dispersion. what is an advantage that the standard deviation has over the interquartile range? choose the correct answer below. a. the interquartile range is preferred when the distribution is symmetric. an advantage of the standard deviation is that it increases as the dispersion of the data increases. b. the interquartile range is preferred when the data are not skewed or no have outliers. an advantage of the standard deviation is that it uses all the observations in its computation. c. the interquartile range is preferred when the distribution is symmetric. an advantage of the standard deviation is that it is resistant to extreme values. d. the interquartile range is preferred when the data are bell shaped. an advantage of the standard deviation is that it is resistant to extreme values. e. the interquartile range is preferred when the data are skewed or have outliers. an advantage of the standard deviation is that it uses all the observations in its computation. f. the interquartile range is preferred when the data are bell shaped. an advantage of the standard deviation is that it increases as the dispersion of the data increases.
Answers: 2
question
Computers and Technology, 25.06.2019 10:30
Why does the hp computer not have bluetooth?
Answers: 1
You know the right answer?
There are two prompts below. for the first prompt, you will be implementing a stack and for the seco...
Questions
question
Mathematics, 27.10.2020 04:00
question
Chemistry, 27.10.2020 04:00
question
Mathematics, 27.10.2020 04:00
Questions on the website: 13722366