If necessary, create a new project named Advanced27 Project and save it in the Cpp8Chap14 folder. Also

Question:

If necessary, create a new project named Advanced27 Project and save it in the Cpp8\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 Cpp8\Chap14 folder to the Cpp8\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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: