In this laboratory work, you are expected to write a c# console application to make some operations about the customers. Operations and required featurest that you need to cover in your program are following: • Add: This function adds a new person to json file. You need to get inputs from user and adds the new one into json file. • Display: This function displays all people in your json file. • Search: This function let you search with the user id. • Create Password: This function will create a random password for the user and user may choose the length of the password. Password may include numbers and characters. • Exceptions: You need to handle exceptions as well. You should at least handle 3 of exceptional cases. For the case that file can not be found, It is mandatory to catch the exception.

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

In this laboratory work, you are expected to write a c# console application to make some
operations about the customers. Operations and required featurest that you need to cover in
your program are following:
• Add: This function adds a new person to json file. You need to get inputs from user
and adds the new one into json file.
• Display: This function displays all people in your json file.
• Search: This function let you search with the user id.
• Create Password: This function will create a random password for the user and user
may choose the length of the password. Password may include numbers and
characters.
• Exceptions: You need to handle exceptions as well. You should at least handle 3 of
exceptional cases. For the case that file can not be found, It is mandatory to catch the
exception.

In your main class, you first need to read the json file. Then, you should create a list of
objects. You are expected to deserialize your json to list. After that you should create another
json file that has the updated string. You may see the flow in the below:
Seç Microsoft Visual Studio Hata Ayıklama Konsolu
Current File:
101
Kaan
OZAYDIN
Turkey
Ankara
06460
102
Erkan
YILDIZ
Turkey
Ankara
06460
please choose an operation: add, display, search, createPassword, exit
add
First Name:
Emre
Last Name:
Gokmen
Id:
103
Email:
emregkmnegmail.com
Country:
Turkey
State:
Ankara
Zipcode:
06470
Figure 1: Sample Output.
Transcribed Image Text:In your main class, you first need to read the json file. Then, you should create a list of objects. You are expected to deserialize your json to list. After that you should create another json file that has the updated string. You may see the flow in the below: Seç Microsoft Visual Studio Hata Ayıklama Konsolu Current File: 101 Kaan OZAYDIN Turkey Ankara 06460 102 Erkan YILDIZ Turkey Ankara 06460 please choose an operation: add, display, search, createPassword, exit add First Name: Emre Last Name: Gokmen Id: 103 Email: emregkmnegmail.com Country: Turkey State: Ankara Zipcode: 06470 Figure 1: Sample Output.
Sample json string:
[
{
"FirstName": "Kaan",
"LastName": "OZAYDIN",
"EmployeeId": 101,
"Email": ""
"Password":
"Address": {
"ZipCode": "06460",
"State": "Ankara",
"Country": "Turkey"
}
}
"FirstName": "Erkan",
"LastName": "YILDIZ",
"EmployeeId": 102,
"Email":
"Password": ""
"Address": {
"ZipCode": "06460",
"State": "Ankara",
"Country": "Turkey"
}
Above you may see the structure of json file you need to use.
Transcribed Image Text:Sample json string: [ { "FirstName": "Kaan", "LastName": "OZAYDIN", "EmployeeId": 101, "Email": "" "Password": "Address": { "ZipCode": "06460", "State": "Ankara", "Country": "Turkey" } } "FirstName": "Erkan", "LastName": "YILDIZ", "EmployeeId": 102, "Email": "Password": "" "Address": { "ZipCode": "06460", "State": "Ankara", "Country": "Turkey" } Above you may see the structure of json file you need to use.
Expert Solution
steps

Step by step

Solved in 2 steps

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