hem inlo a text file named 123123 ad 121122 123 ammed 12345 2. The user is asked to enter the values for records unth the user enters the value zero (0) for the name then the loop should be 3. Then, the application should read and check each record in the text file and print out all the records that have an ID less tha Le: • The file should be opened only once for writing otherwise the previous content will be truncated. • Make sure you handle all expected exceptions that might be caused by the provided code. mple outputl:

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
You are asked to develop an application that does the following:
1. The application should read the records from the user (String Name and String ID) and write them into a text file named (Employees.txt). The text file should be structured as follow:
Sara
Ahmad
123123
121122
John
123
Mohammed
12345
2. The user is asked to enter the values for records untih the user enters the value zero (0) for the name then the loop should be terminated.
3. Then, the application should read and check each record in the text file and print out all the records that have an ID less than 6 digits.
Note:
• The file should be opened only once for writing otherwise the previous content will be truncated.
• Make sure you handle all expected exceptions that might be caused by the provided code.
Sample outputt:
Enter eployee nae and 10
Sara
Becord we aed stully
Entar pleye na and to
Ahead
Beeed ves ted sueesstully..
tese pieyee nane
and 1D
Juh
Red was added estully..
Inser elayee ae
ad ID
Hhama
ad was dded ecetully..
Eater pleyes an and ID
Thie 1D i la shanc digite
Jahe
Thia 10 Le le. shan aigite
Hhana
IL cisrUL si sinute
3D
Transcribed Image Text:You are asked to develop an application that does the following: 1. The application should read the records from the user (String Name and String ID) and write them into a text file named (Employees.txt). The text file should be structured as follow: Sara Ahmad 123123 121122 John 123 Mohammed 12345 2. The user is asked to enter the values for records untih the user enters the value zero (0) for the name then the loop should be terminated. 3. Then, the application should read and check each record in the text file and print out all the records that have an ID less than 6 digits. Note: • The file should be opened only once for writing otherwise the previous content will be truncated. • Make sure you handle all expected exceptions that might be caused by the provided code. Sample outputt: Enter eployee nae and 10 Sara Becord we aed stully Entar pleye na and to Ahead Beeed ves ted sueesstully.. tese pieyee nane and 1D Juh Red was added estully.. Inser elayee ae ad ID Hhama ad was dded ecetully.. Eater pleyes an and ID Thie 1D i la shanc digite Jahe Thia 10 Le le. shan aigite Hhana IL cisrUL si sinute 3D
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY