Problem

If necessary, create a new project named Advanced27 Project and save it in the Cpp7\Chap...

If necessary, create a new project named Advanced27 Project and save it in the Cpp7\Chap14 folder. Also create a new source file named Advanced27.cpp. If you are using Microsoft Visual C++, copy the Advanced27.txt file from the Cpp7\Chap14 folder to the Cpp7\Chap14\Advanced27 Project folder. Each salesperson at BobCat Motors is assigned a code that consists of two characters. The first character is either the letter F (which indicates a full-time employee) or the letter P (which indicates a part-time employee). The second character is either a 1 (indicating the salesperson sells new cars) or a 2 (indicating the salesperson sells used cars). Use a text editor to open the Advanced27.txt file, which contains the names of BobCat’s salespeople along with each salesperson’s code, and then close the file. Write a program that prompts the user to enter the code (F1, F2, P1, or P2). The program should search the Advanced27.txt file for the code and then display only the names of the salespeople assigned that code. Display an appropriate message if the user enters an invalid code. Save and then run the program. Test the program by entering F2 as the code. The program should display three records: Mary Jones, Joel Adkari, and Janice Paulo. Now, test the program using codes of F1, P1, P2, and S3.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search