-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPROGRAM_SPEC.txt
More file actions
69 lines (63 loc) · 1.67 KB
/
PROGRAM_SPEC.txt
File metadata and controls
69 lines (63 loc) · 1.67 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
This program is about class-mates. The program will
display a main menu where the user can:
Add , Update , Delete , Find a class-mate and then
Exit the program.
Each class-mate will be described by
first name, last name and a role. Umm ... that's it.
The following shows the pseudocode for the entire program.
Features:
Show Class mates
Pretty print all existing records in
the agreed format
Add Class mates
Request inputs (first, last, role)
Test Validity of inputs
Check if input already exists
Print message(Record already exist)
Reload program
Add New Record
Print message
Show All Records
reload_app
Update Class mates
Request inputs (first, last)
Test Validity of inputs
check if inputs exists in a record
print_record
ask for input replacements
test validity of input replacements
insert input replacements
print success
print_records
reload_app // can't figure out how to reload app
Find Class mate
display_sub_menu = {
'f' : 'First Name'
'l' : 'Last Name'
'r' : 'Role'
'v' : 'Full Name'
}
request menu value
test if input is valid
request input
test if input[s] is/are valid
check if input exists
print record[s]
Print input doesn't exist
Delete Class mates
request inputs (first, last)
test validity of input
check existence of input
Delete record
print success message
Show all class mates
reload_app
Print Class mate doesn't exist
reload_app
Exit:
return sys.exit(0)
Main Program order
Display main menu
Ask for input (menu option)
Test input validity with respect to main menu
Execute selected path way