Problem Solving with C++ (9th Edition)
9th Edition
ISBN: 9780133591743
Author: Walter Savitch
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
java programming
A bank locker system has one lock and three keys.O=1, indicates the Owners key is open.M=0,indicates the Managers key is off.N=1, indicates the Nominees key is openL=0 means the locker is off.The locker(L) can be open only for the following conditions:If the Manager’s key and nominee’s keys are open but the owner key is close. ORIf the Manager’s and owner’s keys are open but the other key is close. ORIf the Owner’s key is open but the other keys are close. ORIf all keys are open.i. Find the Boolean function for the above systems outputs 2ii. Simplify the output functions using Boolean Algebra. 22.
User accounts on a computer network require passwords that contain 6 characters: The first character must be an upper-case letter (A-Z), the last character must be a digit (0-9), and the 4 middle characters can be either a lower-case letter (a-z), upper-case letter, or a digit. How many passwords are
possible is allowed (repetition of characters is allowed based on the given requirements)? Enter your answer in the box below.
Answer =
Chapter 9 Solutions
Problem Solving with C++ (9th 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
- The process that the public uses to log/register complaints begins with the loading of the complaint on the Online Portal or Mobile App. All loaded complaints will be in the ComplaintLoaded state. Complaints can either be accepted (through the acceptance option) or rejected (through the reject option). All accepted complaints will be in the ComplaintsAccepted state and rejected complaintswill be in the Complaints Rejected State. For both Accepted and Rejected Complaint, there is a send notification option that sends notifications out. The process ends with Notification Sent state for all the notifications that are sent out. The Online Portal or Mobile App has a mechanism to check the details of the complaint before accepting or rejecting Q.3.1 Analyse the process used to log/register complaints and create a state machine diagram.arrow_forwardA Web site validates a 16-digit ID number based on the following rules - 1. Starting with the leftmost digit, double it and then double every other digit after it. However, if any of the doubled digits is a two-digit number, subtract 9 from it. Then sum these new digits. For instance, if the ID card number is 5866793610024475, then the digits considered are 5, 6, 7, 3, 1, 0, 4, 7, their new replacements are 1, 3, 5, 6, 2, 0, 8, 5 and the sum of the replacement is 30. 1 2 3 4 6. 7 8 9 10 11 12 13 14 15 8. 6. 7 9 3 6 1 4 4 7 5 6 7 1 4 7 5*2-9 6*2-9 7*2-9 3*2 1*2 0*2 4*2 7*2-9 =1 =3 =5 =6 =2 =0 =8 =5 2. Sum together the remaining sever digits from the ID card number. That is, the digits in the odd-numbered positions. With the ID card number above, we obtain 8+6+9+6+0+2+4+5 = 40. 3. Add together the two sums. If the result is a multiple of 10, then accept the ID card number. Otherwise, reject it. We accept the ID card number since 30+40=70, a multiple of 10. Write a program that perform…arrow_forwardWrite a script code that creates a user with these properties: 1. Name: eng, ID:1000, GID:1000,and Password:1234 2. If the system creates eng account correctly print a welcome message "Welcome eng". Else print error message. 3. Let the eng to become a member in root group. 4. Let the eng to be able to create and execute any script. 5. Delete the GID=1000;arrow_forward
- The Pizza Ordering System allows the user of a web browser to order pizza forhome delivery. To place an order, a shopper searches to find items to purchase,adds items one at a time to a shopping cart, and possibly searches again for moreitems. When all items have been chosen, the shopper provides a delivery address.If not paying with cash, the shopper also provides credit card information. Thesystem has an option for shoppers to register with the pizza shop. They can thensave their name and address information, so that they do not have to enter thisinformation every time that they place an order.Develop a use case diagram, for a use case for placing an order, PlaceOrder. Theuse case should show a relationship to two previously specified use cases,IdentifyCustomer, which allows a user to register and log in, and PaybyCredit,which models credit card payments.arrow_forwardAfter executing the following code, a message would be displayed on the screen. What would be the message and it attributes and at which location it would be displayed? MOV CX, 10 MOV AX, 0XB800 MOV ES, AX MOV DI, 810 MOV AX, 0x9230 L1: MOV WORD [ES: DI], AX ADD DI, 2 INC Ax LOOP L1arrow_forwardAppointment scheduling by an administrative staff: The below given is a scenario shows the process of patient appointment scheduling by an administrative staff.The staff login to the system, the system validates the credentials. The staff selects appointmentpage and select an appointment date. Add the patient ID and send for an appointment to thesystem. The system verifies the date and accepts or reject based on the availability of the bookingslot on that particular date. If the booking is available, the database will be updated and sendconfirmation message to the staff, or sends an error message. the proplem: 3.14 - Draw a sequence diagram for the Appointment scheduling by anadministrative staff.Requirements of the sequence diagram The objects involved Messages between the objects The objects’ lifelines A fragment [if any]arrow_forward
- Rent-a-Car is a car rental company with a large fleet of cars and it offersshort term rentalto both individual and corporate customers. To rent a car, a customer mustbe registered. If the customer is an individual, the customer name, an emailand a contact number arerequired. If the customer is a corporate customer, the company registrationnumber, the year it isestablished, email addressand a contact numbermust be supplied. If customerregistration is unsuccessful, the customer data is not recorded. Otherwise, a customer ID is generated.Individual customersthen need to supply credit card information which includes card holder name, card number,date of issue, expirydate and security code before any rental can be made. If the customer is corporate, an accountis createdfor payment purpose. The account is identified by account numberandit recordsthe outstanding balance. Arentalrequestcan be made not more than 3 months in advance. To rent, acustomer selectsa collection dateand time, a return…arrow_forwardThe National Commerce Bank has hired you to create web application that verifies a customer personal identification number (PIN). A valid PIN is a seven-digit number that meets the following specifications: Digit 1: Must be in the range of 7 through 9 Digit 2: Must be in the range of 5 through 7. Digit 3: Must be in the range of a through d Digit 4: Must be in the range of a through Digit 5: must be in the range of 6 through 9 Digit 6: Must be in the range of 3 through 67 Digit 7: Must be in the range of 4 through 8 Notice that each digit must fall into a range of integers. Do not use HTML5 validation support. Your application should have two arrays: intrinimus and intraximus. The intrinimum array should hold the minimum value for each digit position, and the intraximam array should hold the maximum value for each digit position. (use a different Javascript file for this). the application should allow the user to enter seven digits on the HTML form. when the Verify button is clicked,…arrow_forwardQ2: In a wireless network company, one user create a signal for call making. IT officer is asked to create two process from that signal to display process ID to find Process ID same or not. Write a c code for this scenario.arrow_forward
- Create a COVID-19 support service application using Python namedCovidSupportSystem that will provide the user with the below options:• Statistics,• Prevention,• Symptoms,• Treatment and Report case 1.1 Under Statistics state how many cases there are in SA, China and USA, then askthe user if they would like to see the cases for a different country, if yes, askthem to pick a number between 0 and 9, then pull a country from a list to show 1.2 Under Prevention place general COVID19 prevention information 1.3 Under Symptoms place general COVID19 Symptoms 1.4. Under Treatment place general COVID19 Treatment 1.5. Under Report case ask the user if they have any of the symptoms, if no, thenstate they do not have COVID19, if yes, then ask the user if they have atemperature above 38.5°C, if no, then state they do not have COVID19, ifyes, ask them to choose which country, USA, SA or China, after they havedecided, the number of infection should increase in that country with 1 1.6. The exit option…arrow_forwardLearn the various access control methods. Examine each option's various controls.arrow_forwardi want you to draw a er model dont give me this draws all tutors answred by it :(i want new one only photosarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
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