Computers and Technology

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).

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:00, alexj29227405
Write a method named addall that could be placed inside the hashintset class. this method accepts another hashintset as a parameter and adds all elements from that set into the current set, if they are not already present. for example, if a set s1 contains [1, 2, 3] and another set s2 contains [1, 7, 3, 9], the call of s1.addall(s2); would change s1 to store [1, 2, 3, 7, 9] in some order. you are allowed to call methods on your set and/or the other set. do not modify the set passed in. this method should run in o(n) time where n is the number of elements in the parameter set passed in.
Answers: 2
image
Computers and Technology, 22.06.2019 22:40, shaylawaldo11
Write a program that defines symbolic names for several string literals (chars between quotes). * use each symbolic name in a variable definition. * use of symbolic to compose the assembly code instruction set can perform vara = (vara - varb) + (varc - vard); ensure that variable is in unsigned integer data type. * you should also further enhance your symbolic logic block to to perform expression by introducing addition substitution rule. vara = (vara+varb) - (varc+vard). required: debug the disassembly code and note down the address and memory information.
Answers: 3
image
Computers and Technology, 23.06.2019 02:30, chaaaa
People with high self-esteem: accept their strengths and weaknesses. believe that failed experiences are failures of their whole self. feel good about who they are only when they reach total success. need positive external experiences to counteract negative feelings that constantly plague them.
Answers: 1
image
Computers and Technology, 23.06.2019 16:00, lokaranjan5736
Write a grading program for a class with the following grading policies: a. there are two quizzes, each graded on the basis of 10 points. b. there is one midterm exam and one final exam, each graded on the basis of 100 points. c. the final exam counts for 50% of the grade, the midterm counts for 25%, and the two quizzes together count for a total of 25%. (do not forget to normalize the quiz scores. they should be converted to a percentage before they are averaged in.) any grade of 90 or more is an a, any grade of 80 or more (but less than 90) is a b, any grade of 70 or more (but less than 80) is a c, any grade of 60 or more (but less than 70) is a d, and any grade below 60 is an f. the program will read in the student’s scores and output the student’s record, which consists of two quiz and two exam scores as well as the student’s average numeric score for the entire course and final letter grade. define and use a structure for the student reco
Answers: 2
Do you know the correct answer?
There are two prompts below. for the first prompt, you will be implementing a stack and for the seco...

Questions in other subjects:

Konu
Computers and Technology, 16.07.2019 02:00