Read a text file from a location. Choose the input file in the same directory as the
Question:
Read a text file from a location. Choose the input file in the same directory as the project source file.
The input file contains, several information about different persons:
- Name (with Salutation, salutation does not count as part of the name)
-Email address
-Phone number
-Room Number
It is not required to have all information available for every person. For example, one person can not have a phone number or room number.
Your code at first display the following five (5) options:
1. Show all full names
2. Show Email address
3. Show Phone number
4. Show Room number
5. Exit
Based on User input (user enters a number between 1 to 5), you should show all the available information from the text file. Then, you are required to show thetotal countof all the information in each user attempt.
For full names, just show their namewithout salutation(like Dr./ Mr./ Ms.)
You are required to use regular expression to match these criteria. A sample input file is providedhereDownload here.
The code will exit when the user enter option 5.
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill