| Directory Listing | |
|---|---|
|  | 
									arrays_lab_session1.cpp								 | 
|  | 
									arrays_lab_session2.cpp								 | 
|  | 
									example.cpp								 | 
|  | 
									labD_pseudo_code.txt								 | 
|  | 
									switch_dowhile_example.cpp								 | 
|  | 
									switch_example.cpp								 | 
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
LAB D PSEUDO CODE
Declare Variables for Code and Duration (as Int).
Declare Variable for redo (as char).
Declare Variables for storing information (as string).
do {
	Ask for code
	Ask for problem duration
	
	Find out what the issue is by error code (via switch-case) {
		If code is 1, 2, or 3
			Put "IR Malfunction" into string variable.
		
		If code is 4
			Put "receiver malfunction" into string variable.
		
		if code is 5, 6, 7, or 8
			Put "low battery" into string variable.
		
		Otherwise...
			Put "unknown malfunction" into string variable.
	}
	Determine how urgent the problem is by duration.
		If the duration is more than 14 days
			Urgency is "high"
		If the duration is more than 7 days and less (or equal) to 14 days
			If error code is 6 or 7
				Urgency is "high"
			Otherwise
				Urgency is "medium"
		If less than or equal to 7 days
			If error code is 1 or 3
				Urgency is "very low"
			Otherwise
				Urgency is "low"
	
	Print out information
	Ask user if they want to repeat program
}
while (redo != 'n' && redo != 'N');