Problem Solving with C++ (10th Edition)
Problem Solving with C++ (10th Edition)
10th Edition
ISBN: 9780134448282
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
Question
Book Icon
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.

Blurred answer
Students 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
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning