Problem Solving with C++ (10th Edition)
10th Edition
ISBN: 9780134448282
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 9, Problem 5PP
Program Plan Intro
Computer Lab Logging
Program Plan:
- Include the necessary libraries.
- Use namespace.
- Define the constants and type definition.
- Define the function prototypes.
- Define the function “createArrays()” to create the dynamic array for the lab.
- Declare the variables.
- Define the first array which is the array of labs.
- Define the second array which defines the size of the lab.
- Define the function “freeArrays()” to release the allocated memory.
- Define the function “showLabs()” to display the status of all labs.
- Define the function “login()” to simulate the user login.
- Declare the required variables.
- Get input from the keyboard, validating data ranges.
- Use a while loop to repeat operation until user requires.
- Store the value and display the message.
- Finally, assign that station to the user.
- Define the function logoff() to logoff that user.
- Declare the required variables.
- Get input from keyboard, validating data ranges.
- Use a while loop to repeat operation until user requires.
- Store the value and display the message.
- Use a for loop to repeat operation until user requires.
- Display the message of the user logged in.
- Otherwise display that user is not logged in.
- Define the function “search()” to search that user.
- Declare the required variables.
- Get input from keyboard, validating data ranges.
- Use a while loop to repeat operation until user requires.
- Store the value and display the message.
- Use a for loop to repeat operation until the user is found out.
- Otherwise display that user is not logged in.
- Define the main method.
- Declare the variables that are required for program.
- Initialize lab sizes to those given in the problem.
- Create a ragged array structure.
- Use a while loop to repeat operation until user requires.
- Perform login, logoff or search function.
- Free memory before exiting.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Alert dont submit AI generated answer.
i need this on intellij IDEA pls
i want you to draw a er model dont give me this draws all tutors answred by it :(i want new one only photos
Chapter 9 Solutions
Problem Solving with C++ (10th Edition)
Ch. 9.1 - Prob. 1STECh. 9.1 - Prob. 2STECh. 9.1 - Give at least two uses of the operator. State...Ch. 9.1 - Prob. 4STECh. 9.1 - Prob. 5STECh. 9.1 - Suppose a dynamic variable were created as...Ch. 9.1 - Write a definition for a type called NumberPtr...Ch. 9.1 - Prob. 8STECh. 9.2 - Write a type definition for pointer variables that...Ch. 9.2 - Suppose your program contains code to create a...
Ch. 9.2 - Prob. 11STECh. 9.2 - Prob. 12STECh. 9.2 - What is the output of the following code fragment?...Ch. 9.2 - What is the output of the following code fragment?...Ch. 9.2 - What is the output of the following code fragment?...Ch. 9 - Prob. 1PCh. 9 - Write a program that asks the user to input an...Ch. 9 - Palindrome testing with pointers This Practice...Ch. 9 - Do Programming Project 3 in Chapter 7 in this...Ch. 9 - Do Programming Project 11 in Chapter 7 using a...Ch. 9 - Write a function that takes a C string as an input...Ch. 9 - Prob. 5PPCh. 9 - One problem with dynamic arrays is that once the...Ch. 9 - Prob. 7PPCh. 9 - Write a program that outputs a histogram of...
Knowledge Booster
Similar questions
- In Senior Project Website, the user requests the website to search for previous senior projects, the website displays the search web form, the user inputs the keywords to be used for the search process, the user submits the search criteria to the website, and the website requests a remote database to search for senior projects that fulfill the requested criteria (keywords). The remote database returns back a Boolean value (indicating if the search is successful or not) and a list of found senior projects (the list is empty if not successful), If the search is successful, the website displays the list of received senior projects, else, the website displays error dialog box indicating that no projects were found. Q2. For Senior Project Website System described above, students are required to conduct the following task: a) Design the Sequence Diagram of Senior Project Website System described above.arrow_forwardA box of cookies holds 24 cookies, whereas a container holds 75 boxes. Create a software that questions the user for the total number of cookies to be sent and then produces the number of boxes and containers required to send the cookies. If there are insufficient cookies to fill a box, it should be rejected and the number of remaining cookies output. If the number of boxes ordered does not fill the container, the remaining boxes may be discarded, and the total number of boxes should be produced.arrow_forwardQ: Make System Sequence Diagram on any 3 use-cases from following scenario: A client wishes to develop a COVID-19 Tracer App. The app should automatically track and store contacts’ IDs of two users with same app. The users should be able to see a login/signup window upon new installation of app. The user must be able to view his/her account information. The user can update his/her account information. The user can view the ID numbers of contacts he/she made in recent 15 days. The user must be notified if someone tested COVID positive among his/her contact. The user can view COVID symptoms. The user should be able to check his health condition in terms of COVID symptoms. The user can view self quarantine guidelines. The user should be able to view COVID statistics in his/her area. The user can view COVID statistics around the whole country. The user should be able to decide whether or not share his/her information with the government. The government should be able to view information of…arrow_forward
- Create a JavaFX program to allow a user to query the Northwind database. You should be able to perform the following functionality using the program: 1. Print order total (not including the freight cost) for a given order number The program will ask the user for an order number, and then print out the total for all products in the order, taking into account quantities and discounts. (All computations should be done within the SQL query). Print all order details for a given order number The program will ask the user for an order number, and then print the order date, freight charge, and all products and their quantity, unit price, and discount for the order. Print the names and cities of all customers in a given state The program will ask the user for a state, and then print out the names and cities of all customers in this state in order by city. Print the names of all employees who have a birthday in a given year The program will ask the user for a year, and then…arrow_forwardDesign a Java application that will allow a user to capture the amount of customers per MOMENTO! a local hair salon. Allow the user to enter in the salon name, followed by the number of customers the hair salon had for each month of the year. 14 42 Enter the hair salon name: Salon Sally Enter customer count for Jan Enter customer count for Feb Enter customer couns for Max Enter customer count for Apr Enter customer count for May 17 Enter customer count for Jun >> 49 Enter customer count for Jul >> 55 Enter customer couns for Aug Enter customer count for Sep $1 Enter customer count for Oct 10 3 Enter customer couns for Nov >> 48 Enter customer count for Dec >> 63 Continue to capture the customers per month for the salon. Once all the customers have been captured create a hair salon results report. In the report display the average revenue generated per month. The average salon price is R120 per hair style. The average revenue generated per month is calculated by (number of customers x…arrow_forwardFour in a row is a game in which players take turns adding tokens to the columns on the game board. Tokens fall to the lowest position in the chosen column that does not already have a token in it. Once one of the players has placed four of their tokens in a straight line (either vertically, horizontally, or diagonally), they win the game If the board is full and no player has won, then the game ends in a draw. TASK Using the following class descriptions, create a UML diagram and a version of Four in a row game The game must allow for a minimum of two and maximum of four players The game must allow each player to enter their name(duplicate names should not be accepted) The game should give the players the ability to choose how many rows (between four and ten), and how many columns (between four and ten) the game board should have. The code uses several classes, including "Player", "Board","Game" and exceptions for handling errors such as invalid moves and full columns.…arrow_forward
- please answer within 30 minutes.arrow_forwardDescription: There are 5 philosophers sitting around a table and try to eat from the center of the table. 5 chopsticks also lay on the table. Let us call the 5 philosophers in clockwise P1, P2, ...P5. There also 5 chopsticks clockwise S1, S2, ..., S5 on the table. There are only one chopstick between every two philosophers. Every right hand chopstick will have the same index as the philosopher. For example, on the right hand side of P1, the chopstick is called S1. And every left hand side chopstick number is 1+number of the philosopher. A philosopher spend random time to think, then he feel hungry and try to eat. The middle dish can provide enough food for everyone at the same time. But a philosopher only can start to eat when he picked up two chopsticks from left hand side and right hand side to form a pair of chopsticks. If a philosopher take one chopsticks, he will try to fight with neighbours to get another one, and never back off to put down the one in his hand. Once the…arrow_forwardTask 4: The InstantRide User Satisfaction team is a core team for InstantRide, and they focus on increasing the customer satisfaction. They want to learn the travel time for each ride in the system. You need to return the USER_ID, and the TRAVEL_TIME column which is calculated using the TIMEDIFF function on the TRAVEL_END_TIME and the TRAVEL_START_TIME.arrow_forward
- On the Faculty Data worksheet, in cell J3, use an IFS function to calculate the retirement matching dollar amount for each faculty member participating in the retirement plan. If the participating member is a Full Professor, the matching amount is 4% of the salary. Otherwise, the matching amount is 3% of the salary. If the member is not participating, show a blank.arrow_forwardCooper College maintains a master file of students and credits earned. Each semester the master is updated with a transaction file that contains credits earned during the semester. Each file is sorted in Student ID number order. start Declarations num masterID string masterName num masterCredits num transID num transCredits string bothDone = "N" num HIGH_VALUE = 999999 InputFile master InputFile trans OutputFile newMaster getReady() while bothDone = "N" detailLoop() endwhile allDone()stop getReady() open master "studentFile.dat" open trans "semesterCredits.dat" open newMaster "updatedStudentFile.dat" readMaster() readTrans() checkBoth()return readMaster() input masterID, masterName, masterCredits from master if eof then masterID = HIGH_VALUE endifreturn readTrans() input transID, transCredits from trans if eof then transID = HIGH_VALUE endifreturn checkBoth() if masterID =…arrow_forward> make -s > ./main Enter String: Party on the Quad Enter Key: Homecoming Original Message: Party on the Quad Encrypted Message: WODXACZBUKXIMH Decrypted Message: PARTYONTHEQUADarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning