-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtask4.txt
37 lines (29 loc) · 1.09 KB
/
task4.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Stage 4/6: X-files
Description
Now, let's further modify the program and teach it to read the input data from a file.
Objectives
In this stage, your program should read data from a text file instead of the standard input. The file structure will depend on your text data type (personal information, address information, book information, and so on). See an example below:
Dwight Joseph [email protected]
Rene Webb [email protected]
Katie Jacobs
Erick Harrington [email protected]
Myrtle Medina
Erick Burgess
The program must process the command line argument --data followed by the name of the file with the data, for example, --data text.txt.
Note that the file should not include the total number of lines. All lines must be read only once, at the start of your program.
Output example
The lines that start with > represent the user input. Note that these symbols are not part of the input.
=== Menu ===
1. Find a person
2. Print all people
0. Exit
> 1
Enter a name or email to search all suitable people.
Rene Webb [email protected]
=== Menu ===
1. Find a person
2. Print all people
0. Exit
> 0
Bye!