Question
You are given a file named staff.txt with a list of 100 staff members, 100 staff ID's, 100 district numbers, and years of employment as
You are given a file named staff.txt with a list of 100 staff members, 100 staff ID's, 100 district numbers, and years of employment as shown below.
Jennifer Paytas, 33578925, 220, 2 years
Maria Mether, 4589975, 125, 6 years
Josh Paulick, 8763251, 330, 15 years
etc...
Your job is to create an app in C++ for new students to use that takes user input commands. A search command that allows the students to look up a teacher and display there district number, staff ID, or years of employment and a quit command that closes the file and displays a message. If a teacher is not found, display an appropriate error message.
Example: (User input is highlighted)
Welcome Back!
Please enter a command: Search Maria Mether
Searching...
Maria Mether was found.
Enter Command: District
125
Enter Command: Employment time
6 years
Enter Command: Search Josh Paulick
Searching...
Josh Paulick was found
Enter Command: Staff ID
8763251
Enter Command: Search Joshua Paulick
Searching...
Joshua Paulick was not found
Enter Command: Quit
Thank you!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started