haas/spring2026/cprog/eoce/EoCE.md
... ...
@@ -0,0 +1,418 @@
1
+# CPROG SPRING2026 EOCE
2
+
3
+The End of Course Experience (eoce) satisfies the fourth discrete grading
4
+component of the course. It is meant to evaluate your knowledge and
5
+understanding gained through the semester.
6
+
7
+Unlike the regular weekly projects, the purpose of which is to promote a
8
+learning and understanding of the concepts of the course, this EoCE is
9
+meant more as a demonstration of your proficiency in understanding and
10
+utilizing the concepts and skills obtained, showing me how productive you
11
+can be with the experiences gained.
12
+
13
+## RULES
14
+
15
+Presented within will be various activities evaluating your knowledge and
16
+experience gained this semester. In places where you are able, the more
17
+you write (ie comment) and explain topics the better the chance you will
18
+have of receiving full credit (and alternatively, the more credit you
19
+will receive should something defer correctness).
20
+
21
+Unless otherwise specified, the components on this experience are open
22
+resource with the exception of other individuals. In that respect, it
23
+is **CLOSED PERSON**. This means you are not to communicate with
24
+other people (either in the class or otherwise), in real life or
25
+electronically. Use your own knowledge, use your own skills, and use your
26
+own ability to access the allowed resources to aid you in coming up with
27
+your well thought out responses to each activity.
28
+
29
+You are allowed, and expected, to seek clarification on any activity by
30
+asking me. But the aim here is to evaluate what you have learned, so do
31
+not expect tutoring. Any help should be prompted by a well-asked
32
+question. The better and more informed your questions, the better my
33
+responses MAY be. In many ways, I designed this EoCE premised on each and
34
+every one of you interacting with me through the asking of informed
35
+questions. Those that do not take advantage of asking such calibre of
36
+questions and instead end up struggling, please know that you're doing
37
+this wrong. But also know that, the aim here is for you to accomplish the
38
+various tasks through your own understanding of the task and concepts at
39
+hand, and not to outsource your thinking and remembering to others.
40
+
41
+You are to all of the available items. Submission is to be as a submitted
42
+archive to the usual and appropriate places: the 'pctF' project submitted
43
+via its usual process, the other items will be part of the `eoce` project
44
+that you would have `grabit`ed.
45
+
46
+To maximize any credit received (or to minimize points lost), optimize
47
+your submission for an organized and easy-to-read presentation of
48
+information that conforms with each section's stated guidelines. In the
49
+case of programs or scripts written, ensure that you are following proper
50
+and consistent commenting/documentation and indentation practices. Use
51
+well-named variables (at least 4 symbols long), and be mindful of how
52
+your particular files submitted will appear on a reasonably-sized
53
+terminal (most of my terminals are 80-90 characters wide), should that be
54
+the contextually relevant destination of output.
55
+
56
+The EoCE is worth 26 points of your overall grade (projects (52) +
57
+participation (13) + notes (13) + eoce (26) = 104), representing a
58
+distinct fourth category within the grading policy of the course
59
+(Projects, Journal, Participation, and EoCE).
60
+
61
+### FINALS WEEK AVAILABILITY
62
+
63
+While some classes are allocated a specific meeting time during finals
64
+week, I make all such times available should you be free and have
65
+questions. As such, finals week in **CHM123** will look something like
66
+this:
67
+
68
+ * Tuesday, May 12th, 2026 from 08:00AM-11:00AM
69
+ * Wednesday, May 13th, 2026 from 02:30PM-05:30PM
70
+ * Thursday, May 14th, 2026 from 11:15AM-02:15PM
71
+
72
+Do note, the discord remains available for questions, and there is no
73
+need for you to be physically present at a given time during finals week.
74
+These are merely resources available to you should you wish to utilize
75
+them in the appropriate manners they are available to be used.
76
+
77
+## GRABIT
78
+
79
+There is a **grabit** available for the EoCE. It would house the code for
80
+the various programming sections. The letter division is transacted via
81
+its own `pctF` project.
82
+
83
+## CONTENT
84
+
85
+### MAKE A CLOCK
86
+
87
+Later in the semester, we started playing with the Vircon32 fantasy
88
+console, allowing us to make interactive and visual programs. Here, you
89
+will be creating a Vircon32 program (and associated resources) to produce
90
+a functioning 12 hour "analog" wall clock, updating each second.
91
+
92
+Using the Vircon32 API, obtain the current second since the epoch (Jan 1,
93
+1970 at midnight- via the **get_time()** function), and determine
94
+manually the current time (using MATH, not any of the Vircon32 time
95
+translation functions).
96
+
97
+Render a 12 hour analog wall clock, complete with numbers, minute
98
+divisions, and the hour, minute, and second hands, correctly oriented to
99
+display the current time, and updating each second.
100
+
101
+Have the clock tick (or have some button toggle clicking).
102
+
103
+If you'd like, display some of the other date information (also computed
104
+mathematically), or support different timezones.
105
+
106
+You could also have some level of interactive control, where the user can
107
+monkey with the time, and have it continue on from the point of
108
+manipulation.
109
+
110
+Be sure to provide, either as a comment block in the source code, or as
111
+an obvious accompanying file, a summary of what you did, how to operate
112
+it (assuming these aren't in the form of on-screen instructions during
113
+operation), what isn't working, what from these specifications hasn't
114
+been achieved.
115
+
116
+Your end result will be assessed based on implementation and correctness
117
+of functionality, along with clear, ease of use operation of the program.
118
+
119
+The usual attributes of staying within the spirit of the project, a clean
120
+build, good indentation, descriptive comments, etc. all still apply.
121
+
122
+Please provide ALL assets and helper files, along with your source code,
123
+in order to build your cartridge.
124
+
125
+### LONG DIVISION GENERATOR
126
+
127
+This semester, a regular companion to our weekly projects was the
128
+presence of a letter division puzzle. A long division problem with the
129
+numbers swapped out with letters, it helped exercise our critical
130
+thinking and troubleshooting abilities.
131
+
132
+This problem explores the basis of that puzzle, where you will be writing
133
+a program that generates a numeric long division problem (the first step
134
+in a process of writing our own letter division puzzle generator).
135
+
136
+Your program is as much about the values generated as it is the output
137
+formatted. That is to say: output formatting (spacing) is NOT something
138
+to be ignored.
139
+
140
+ * Everything goes to STDOUT
141
+
142
+ * subtraction signs justified to the left-most digit of the longer
143
+ value being subtracted (see examples)
144
+
145
+ * quotient should not be less than 3 digits
146
+
147
+ * divisor should be 3-5 digits long
148
+
149
+ * dividend should be 7-9 digits long
150
+
151
+ * program runs through to final remainder
152
+
153
+ * note the alignment (spacing is VERY important for this task)
154
+
155
+ * values should be randomly generated
156
+
157
+ * seed your random number generator with: **srand(time(NULL));**
158
+
159
+ * you'll want to include **time.h** to use the **time()** function
160
+
161
+Your program does not need to accept any arguments, but when run, will
162
+produce a numeric visualization of a long division problem (spacing and
163
+formatting so everything lines up). A few examples follow:
164
+
165
+```
166
+lab46:~/src/SEMESTER/cprog/eoce/ldg$ ./ldg
167
+ 3320
168
+ +---------
169
+17382 | 57716687
170
+ -52146
171
+ =====
172
+ 55706
173
+ -52146
174
+ =====
175
+ 35608
176
+ -34764
177
+ =====
178
+ 8447
179
+```
180
+
181
+Another example:
182
+
183
+```
184
+lab46:~/src/SEMESTER/cprog/eoce/ldg$ ./ldg
185
+ 11403
186
+ +---------
187
+6270 | 71498775
188
+ -6270
189
+ ====
190
+ 8798
191
+ -6270
192
+ ====
193
+ 25287
194
+ -25080
195
+ =====
196
+ 20775
197
+ -18810
198
+ =====
199
+ 1965
200
+```
201
+
202
+### OOP WITH INHERITANCE
203
+
204
+Your task here is to explore and create a C++ program that utilizes
205
+inheritance.
206
+
207
+Classes that inherit from another class acquire the attributes and
208
+behaviors of the class they inherit from.
209
+
210
+Classes that inherit from another are called __derived classes__, __child
211
+classes__, or __subclass__.
212
+
213
+Classes that are inherited from are called __base classes__, __parent
214
+classes__, or __superclasses__.
215
+
216
+To inherit traits from another class use a colon after the class's
217
+declaration, followed by the name of the base class (and optionally an
218
+access specifier).
219
+
220
+```
221
+class Derived : public Base
222
+```
223
+
224
+A class can inherit data or functions from multiple base classes. In
225
+order to do this, we would create a class derivation list, which names
226
+the base classes. The form would be the same as above, however, each
227
+class would be separated with a colon.
228
+
229
+Problems can be created when a derived class inherits from more than one
230
+base class. An example of this is when two or more base classes have a
231
+member with the same name. The problem here is the derived class cannot
232
+distinguish between the two members.
233
+
234
+If you have a function expecting an argument of a base class's type, you
235
+can pass objects of a type that derived from said base class.
236
+
237
+For example:
238
+
239
+```
240
+#include <cstdio>
241
+
242
+class Vehicle
243
+{
244
+public:
245
+ float gas{ 15.53f };
246
+};
247
+
248
+class Car : public Vehicle
249
+{
250
+public:
251
+ unsigned short tires{ 4 };
252
+};
253
+
254
+void print_gas(const Vehicle& vehicle)
255
+{
256
+ std::printf("The vehicle has %.2f gallons of gas left\n", vehicle.gas);
257
+}
258
+```
259
+
260
+You are able to pass an object of type Car to print_gas.
261
+
262
+```
263
+Car myCar{};
264
+print_gas(myCar);
265
+```
266
+
267
+Inheriting from a base class using the __public__ access specifier means
268
+public members of the base class will become public members of the
269
+derived class, and protected members of the base class will become
270
+protected members of the derived class. Private members of the base class
271
+will still be private.
272
+
273
+A class with the keyword struct, and unions, will have public access by
274
+default, for their members and base classes.
275
+
276
+Inheriting from a base class using the __protected__ access specifier
277
+means both public and protected members of the base class will become
278
+protected members of the derived class. Private members of the base class
279
+will still be private.
280
+
281
+Inheriting from a base class using the __private__ access specifier means
282
+all members of the base class will become private members of the derived
283
+class.
284
+
285
+A class with the keyword class will have private access for its members
286
+and base classes by default.
287
+
288
+The Child class is being referred to the class that inherits from another
289
+class, and the Parent class is being referred to the class that is being
290
+inherited from.
291
+
292
+Since the Child simply inherits the properties of the Parent, one Parent
293
+can have multiple Children.
294
+
295
+Two Children of the same Parent will also have no direct relationship.
296
+
297
+Children can themselves have Children that inherit from them, creating
298
+large inheritance chains.
299
+
300
+Children can also multi-inherit, taking on the attributes of multiple
301
+Parents.
302
+
303
+Parent/Child inheritance chains are a beneficial way to add
304
+specifications to classes without changing the base class functions. An
305
+example of this may be Animals->Dogs: An animal would have a size,
306
+age, living/death status, which are all properties that a dog could
307
+inherit, however, a dog could have it's own functions like fur length,
308
+temperament, so on and so forth. This could be extended by creating a dog
309
+breed class.
310
+
311
+It’s also possible to inherit from a class that is itself derived from
312
+another class
313
+
314
+It is easier to understand inheritance than it is most concepts in
315
+programming, because inheritance follows so closely to where it gets its
316
+name from. If you asked a non-computer programmer what a string is it
317
+would likely make them think of a string of fabric, whereas if you asked
318
+them what inheritance is they would probably think of a concept the same
319
+as how inheritance functions in C++.
320
+
321
+Something interesting to note is that child class cannot access the
322
+private information relating to their parents, but can still have them.
323
+For example, if plant (as a parent class of tree) has a private int of
324
+age, then tree will also have a private value of age. This is because
325
+when inheritance is activated it calls upon the parent's constructor,
326
+which can access the parent's private values.
327
+
328
+When something has multiple parents it is called multiple inheritance.
329
+When there is more than one tier of inheritance (grandparents) it is
330
+called multilevel inheritance. When something has multiple children it is
331
+called hierarchical inheritance. When multiple of these occur it is
332
+called hybrid inheritance.
333
+
334
+Inheritance allows us to reuse classes by having other classes inherit
335
+their members.
336
+
337
+It is possible to make a class non-subclassable (sterile) in C++ with the
338
+"final" keyword.
339
+
340
+Write a program that creates a parent-child class structure. It can be
341
+anything, so long as you genuinely implement it and it works. A few
342
+possible examples for inspiration:
343
+
344
+ * shape -> rectangle
345
+ * vehicle -> car
346
+ * fruit -> strawberry
347
+
348
+Be sure to make use of and follow proper conventions having public,
349
+protected, and private access control (no cheating by making everything
350
+public), and demonstrate inheritance.
351
+
352
+Have a main() function that instantiates an instance of your chosen theme
353
+of class with inheritance, and runs that instantiated object through a
354
+range of tests demonstrating the class works as intended (likely also
355
+prompting the user to input any needed values to configure the attributes
356
+of the object).
357
+
358
+ * https://www.learncpp.com/cpp-tutorial/basic-inheritance-in-c/
359
+
360
+Be sure to comment your code and explain what is going on.
361
+
362
+### PCTF
363
+
364
+Your task here is a familiar one: a letter division, just as we've
365
+encountered all semester. Only, this one is of the solve4 variety (ie not
366
+only do you have to solve for the key and provide a written step-by-step
367
+solution, but you also have to solve for the quotient and the remainder).
368
+
369
+Additionally, the puzzle difficulty has been increased to 'hard', which
370
+should provide more of a challenge than the 'medium'-rated puzzles you've
371
+had prior.
372
+
373
+Be sure to submit the appropriately-named and formatted files persuant to
374
+stated pctX project specifications (especially where a solve4-category
375
+puzzle is concerned).
376
+
377
+## SUBMISSION
378
+
379
+The DEADLINE FOR SUBMISSION of this EoCE is 11:59:59pm EDT (that's
380
+23:59:59 in 24-hour time) Thursday, May 14th, 2026. This is the ultimate
381
+deadline for any and all coursework. There is no "late", only "too late".
382
+Don't be that person, not with this.
383
+
384
+I would highly recommend not waiting until the last moment (or even the
385
+last week) to start on this. It has been released weeks in advance, with
386
+the intention that you chip away at it a little bit at a time, over the
387
+course of weeks.
388
+
389
+As with the projects and other deliverables this semester, you can submit
390
+early (and worthwhile, early submissions or extra work can receive up to
391
+7 bonus points (applicable to the EoCE grading component)), and also
392
+submit as many times as you desire. Note that when you submit, that
393
+resets the timestamp from which I will evaluate any early submission
394
+bonus points or on-time eligibility.
395
+
396
+Eligibility of any received bonus points on the EoCE are ultimately up to
397
+my decision: if you have genuinely put forth just and honest effort that
398
+is worthy of this undertaking, you will likely receive any eligible bonus
399
+points as described. If you are more calculating and avoiding of work in
400
+your EoCE efforts, I reserve the right not to grant any bonus points.
401
+
402
+Also, if I notice any cases of rule violations (people overhelping each
403
+other instead of letting each individual complete the EoCE on their own
404
+accord and ability), you risk forfeiting any/all bonus points or even any
405
+credit for the section(s) that you violated the rules on.
406
+
407
+Additionally:
408
+
409
+ * Solutions not abiding by spirit of project will be subject to a 50%
410
+ overall deduction
411
+ * Solutions not utilizing descriptive why and how comments will be
412
+ subject to a 50% overall deduction
413
+ * Solutions not utilizing indentation to promote scope and clarity will
414
+ be subject to a 50% overall deduction
415
+ * Solutions not organized and easy to read are subject to a 50% overall
416
+ deduction
417
+
418
+Good luck!