Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The program checks to see if the user has already logged in elsewhere. If so the program prints User [ID] is in Lab #(LAB_NUM] at

The program checks to see if the user has already logged in elsewhere. If so the program prints \"User [ID] is in Lab #(LAB_NUM] at Computer # [COMP NUM]\" where [ID] is the user ID, and [LAB_NUM] and [COMP_NUM] are the actual lab and computer numbers that the user is associated with. See the example below. If not the program proceeds to the next step After everything is entered, at the end of the LOGIN process, the program invokes both showstatus/) and showMenu). After everything is entered, at the end of the LOGIN process, the program invokes both showStatus () and showMenu () Enter your S-character ID to login: 12345 Enter the lob 1 (1-4): 1 Enter the Computer #: ( 1-10): STATUS Labe Computers 1: 12345 2: empty 3: empty 4: empty 5 1: empty 2: empty 3: enpty 4: empty 5: epty 6: 1: empty 2: empty 3: empty 4: empty 5: empty 6 1: empty 2: empty 3: empty 4: empty S mpty 9: empty 10: empty mpty 9: empty 10: empty mpty 9: empty 18: empty mpty 7: enpty 8: empty 9: epty 10: empty 1 mpty 6 3 SELECTION MENU 1. LOCTN 2. LOGOUT 3. SEARCH 4. QUIT Enter your S-character ID to login: 12345 Enter the lab# (1-4) 1 Enter the Computer #: (1-18): 1 ERROR, user 12345 is elready logged into that station. STATUS Labd Computers 1: 12345 2 mpty 3: 11 enpty 2: enpty 3: empty 4 1: empty 2: mpty 3: empty 4: 1: enpty 2: empty 3: empty 4: empty S: empty 6: empty 7: empty 8: empty 9: empty 18: empty 9: empty 18: empty 7: empty 8: empty 9: empty 18: empty 7: empty 8:empty 9: empty 18: empty SELECTION HENU 1. LOGIN 2. LOGOUT 3. SEARCH 4. QUIT Enter your 5-character ID to login: 12345 Enter the lab (1-4) 1 Enter the Computer # (1-10): 10 User 12345 is in Lab #1 at Computer #1 STATUS Lab Computers 1: 12345 2: empty 3: empty 4 empty 5 1: empty 2: empty 3: empty 4: empty 5 1: empty 2: empty 3: empty 4: empty 5: empty 6: mpty 7: empty 8: empty 9: empty 18e: empty 1: empty 2: empty 3: empty 4: empty 5: empty 6: empty 7: empty 8: empty 9: empty 18: empty ty 6: empty 7: empty 8: empty 9: empty 18: empty mpty 6: empty 7: empty 8: empty 9: empty 18: empty SELECTION MENU 1. LOGIN 2. 3. SEARCH 4. QUIT (4 Points) When LOGOUT is selected: The program prompts \"Enter your 5- character ID to logout:\" The program checks whether the ID contains any 5 ASCII characters If not the program repeats the prompt \"Enter your 5-character ID to logout:\" until it receives a valid ID Note \"empty\" is not a valid ID If yes the program proceeds to the next validation: If the valid ID is received but not found in your 2D array data structure, the program prompts \"That user is not logged in.\"

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions

Question

Explain the Hawthorne effect.

Answered: 1 week ago