blob: a8952effc5a65a897afb55fa948d9e77865088fd (
plain) (
blame)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
//Tyler Taormina
//Lab 8 Text file
// CST 116
CST116
Module 8: Lab 8
================================================================================================
13a
11.7 Exercises
p 317
4 pts #5-6
Submit: Statements for 5, Judgements for 6
5.
a.) .is_open()
b.)
int num_data = 0;
//open file
ifstream input ("lab8.txt");
// check open file
if (input.is_open())
{
// priming
input >> lname[num_data] >> id[num_data] >> age[num_data];
}
else
cout << "File not opened" << endl;
return 0;
c.)
for the above ^^
input.close()
================================================================================================
13b
11.9 Learn by Doing Exercises
p 323
10 pts #1: write a full program to call the function
Submit: code & run
CODE:
RUN:
================================================================================================
13c
11.13 Debugging Exercises
pp 333-336
10 pts
Submit: code & runs
CODE:
RUN:
================================================================================================
11.14 Programming Exercises
pp. 336-337
10 pts #1
Submit: code & run
34 pts
CODE:
RUN:
|