CPROG SPRING2026 EOCE

The End of Course Experience (eoce) satisfies the fourth discrete grading component of the course. It is meant to evaluate your knowledge and understanding gained through the semester.

Unlike the regular weekly projects, the purpose of which is to promote a learning and understanding of the concepts of the course, this EoCE is meant more as a demonstration of your proficiency in understanding and utilizing the concepts and skills obtained, showing me how productive you can be with the experiences gained.

RULES

Presented within will be various activities evaluating your knowledge and experience gained this semester. In places where you are able, the more you write (ie comment) and explain topics the better the chance you will have of receiving full credit (and alternatively, the more credit you will receive should something defer correctness).

Unless otherwise specified, the components on this experience are open resource with the exception of other individuals. In that respect, it is CLOSED PERSON. This means you are not to communicate with other people (either in the class or otherwise), in real life or electronically. Use your own knowledge, use your own skills, and use your own ability to access the allowed resources to aid you in coming up with your well thought out responses to each activity.

You are allowed, and expected, to seek clarification on any activity by asking me. But the aim here is to evaluate what you have learned, so do not expect tutoring. Any help should be prompted by a well-asked question. The better and more informed your questions, the better my responses MAY be. In many ways, I designed this EoCE premised on each and every one of you interacting with me through the asking of informed questions. Those that do not take advantage of asking such calibre of questions and instead end up struggling, please know that you're doing this wrong. But also know that, the aim here is for you to accomplish the various tasks through your own understanding of the task and concepts at hand, and not to outsource your thinking and remembering to others.

You are to all of the available items. Submission is to be as a submitted archive to the usual and appropriate places: the 'pctF' project submitted via its usual process, the other items will be part of the eoce project that you would have grabited.

To maximize any credit received (or to minimize points lost), optimize your submission for an organized and easy-to-read presentation of information that conforms with each section's stated guidelines. In the case of programs or scripts written, ensure that you are following proper and consistent commenting/documentation and indentation practices. Use well-named variables (at least 4 symbols long), and be mindful of how your particular files submitted will appear on a reasonably-sized terminal (most of my terminals are 80-90 characters wide), should that be the contextually relevant destination of output.

The EoCE is worth 26 points of your overall grade (projects (52) + participation (13) + notes (13) + eoce (26) = 104), representing a distinct fourth category within the grading policy of the course (Projects, Journal, Participation, and EoCE).

FINALS WEEK AVAILABILITY

While some classes are allocated a specific meeting time during finals week, I make all such times available should you be free and have questions. As such, finals week in CHM123 will look something like this:

  • Tuesday, May 12th, 2026 from 08:00AM-11:00AM
  • Wednesday, May 13th, 2026 from 02:30PM-05:30PM
  • Thursday, May 14th, 2026 from 11:15AM-02:15PM

Do note, the discord remains available for questions, and there is no need for you to be physically present at a given time during finals week. These are merely resources available to you should you wish to utilize them in the appropriate manners they are available to be used.

GRABIT

There is a grabit available for the EoCE. It would house the code for the various programming sections. The letter division is transacted via its own pctF project.

CONTENT

MAKE A CLOCK

Later in the semester, we started playing with the Vircon32 fantasy console, allowing us to make interactive and visual programs. Here, you will be creating a Vircon32 program (and associated resources) to produce a functioning 12 hour "analog" wall clock, updating each second.

Using the Vircon32 API, obtain the current second since the epoch (Jan 1, 1970 at midnight- via the get_time() function), and determine manually the current time (using MATH, not any of the Vircon32 time translation functions).

Render a 12 hour analog wall clock, complete with numbers, minute divisions, and the hour, minute, and second hands, correctly oriented to display the current time, and updating each second.

Have the clock tick (or have some button toggle clicking).

If you'd like, display some of the other date information (also computed mathematically), or support different timezones.

You could also have some level of interactive control, where the user can monkey with the time, and have it continue on from the point of manipulation.

Be sure to provide, either as a comment block in the source code, or as an obvious accompanying file, a summary of what you did, how to operate it (assuming these aren't in the form of on-screen instructions during operation), what isn't working, what from these specifications hasn't been achieved.

Your end result will be assessed based on implementation and correctness of functionality, along with clear, ease of use operation of the program.

The usual attributes of staying within the spirit of the project, a clean build, good indentation, descriptive comments, etc. all still apply.

Please provide ALL assets and helper files, along with your source code, in order to build your cartridge.

LONG DIVISION GENERATOR

This semester, a regular companion to our weekly projects was the presence of a letter division puzzle. A long division problem with the numbers swapped out with letters, it helped exercise our critical thinking and troubleshooting abilities.

This problem explores the basis of that puzzle, where you will be writing a program that generates a numeric long division problem (the first step in a process of writing our own letter division puzzle generator).

Your program is as much about the values generated as it is the output formatted. That is to say: output formatting (spacing) is NOT something to be ignored.

  • Everything goes to STDOUT

  • subtraction signs justified to the left-most digit of the longer value being subtracted (see examples)

  • quotient should not be less than 3 digits

  • divisor should be 3-5 digits long

  • dividend should be 7-9 digits long

  • program runs through to final remainder

  • note the alignment (spacing is VERY important for this task)

  • values should be randomly generated

    • seed your random number generator with: srand(time(NULL));

      • you'll want to include time.h to use the time() function

Your program does not need to accept any arguments, but when run, will produce a numeric visualization of a long division problem (spacing and formatting so everything lines up). A few examples follow:

lab46:~/src/SEMESTER/cprog/eoce/ldg$ ./ldg
            3320
      +---------
17382 | 57716687 
       -52146
        =====
         55706
        -52146
         =====
          35608
         -34764
          =====
            8447

Another example:

lab46:~/src/SEMESTER/cprog/eoce/ldg$ ./ldg
          11403
     +---------
6270 | 71498775 
      -6270
       ====
        8798
       -6270
        ====
        25287
       -25080
        =====
          20775
         -18810
          =====
           1965

OOP WITH INHERITANCE

Your task here is to explore and create a C++ program that utilizes inheritance.

Classes that inherit from another class acquire the attributes and behaviors of the class they inherit from.

Classes that inherit from another are called derived classes, child classes, or subclass.

Classes that are inherited from are called base classes, parent classes, or superclasses.

To inherit traits from another class use a colon after the class's declaration, followed by the name of the base class (and optionally an access specifier).

class Derived : public Base

A class can inherit data or functions from multiple base classes. In order to do this, we would create a class derivation list, which names the base classes. The form would be the same as above, however, each class would be separated with a colon.

Problems can be created when a derived class inherits from more than one base class. An example of this is when two or more base classes have a member with the same name. The problem here is the derived class cannot distinguish between the two members.

If you have a function expecting an argument of a base class's type, you can pass objects of a type that derived from said base class.

For example:

#include <cstdio>

class Vehicle
{
public:
	float gas{ 15.53f };
};

class Car : public Vehicle
{
public:
	unsigned short tires{ 4 };
};

void print_gas(const Vehicle& vehicle)
{
	std::printf("The vehicle has %.2f gallons of gas left\n", vehicle.gas);
}

You are able to pass an object of type Car to print_gas.

Car myCar{};
print_gas(myCar);

Inheriting from a base class using the public access specifier means public members of the base class will become public members of the derived class, and protected members of the base class will become protected members of the derived class. Private members of the base class will still be private.

A class with the keyword struct, and unions, will have public access by default, for their members and base classes.

Inheriting from a base class using the protected access specifier means both public and protected members of the base class will become protected members of the derived class. Private members of the base class will still be private.

Inheriting from a base class using the private access specifier means all members of the base class will become private members of the derived class.

A class with the keyword class will have private access for its members and base classes by default.

The Child class is being referred to the class that inherits from another class, and the Parent class is being referred to the class that is being inherited from.

Since the Child simply inherits the properties of the Parent, one Parent can have multiple Children.

Two Children of the same Parent will also have no direct relationship.

Children can themselves have Children that inherit from them, creating large inheritance chains.

Children can also multi-inherit, taking on the attributes of multiple Parents.

Parent/Child inheritance chains are a beneficial way to add specifications to classes without changing the base class functions. An example of this may be Animals->Dogs: An animal would have a size, age, living/death status, which are all properties that a dog could inherit, however, a dog could have it's own functions like fur length, temperament, so on and so forth. This could be extended by creating a dog breed class.

It’s also possible to inherit from a class that is itself derived from another class

It is easier to understand inheritance than it is most concepts in programming, because inheritance follows so closely to where it gets its name from. If you asked a non-computer programmer what a string is it would likely make them think of a string of fabric, whereas if you asked them what inheritance is they would probably think of a concept the same as how inheritance functions in C++.

Something interesting to note is that child class cannot access the private information relating to their parents, but can still have them. For example, if plant (as a parent class of tree) has a private int of age, then tree will also have a private value of age. This is because when inheritance is activated it calls upon the parent's constructor, which can access the parent's private values.

When something has multiple parents it is called multiple inheritance. When there is more than one tier of inheritance (grandparents) it is called multilevel inheritance. When something has multiple children it is called hierarchical inheritance. When multiple of these occur it is called hybrid inheritance.

Inheritance allows us to reuse classes by having other classes inherit their members.

It is possible to make a class non-subclassable (sterile) in C++ with the "final" keyword.

Write a program that creates a parent-child class structure. It can be anything, so long as you genuinely implement it and it works. A few possible examples for inspiration:

  • shape -> rectangle
  • vehicle -> car
  • fruit -> strawberry

Be sure to make use of and follow proper conventions having public, protected, and private access control (no cheating by making everything public), and demonstrate inheritance.

Have a main() function that instantiates an instance of your chosen theme of class with inheritance, and runs that instantiated object through a range of tests demonstrating the class works as intended (likely also prompting the user to input any needed values to configure the attributes of the object).

  • https://www.learncpp.com/cpp-tutorial/basic-inheritance-in-c/

Be sure to comment your code and explain what is going on.

PCTF

Your task here is a familiar one: a letter division, just as we've encountered all semester. Only, this one is of the solve4 variety (ie not only do you have to solve for the key and provide a written step-by-step solution, but you also have to solve for the quotient and the remainder).

Additionally, the puzzle difficulty has been increased to 'hard', which should provide more of a challenge than the 'medium'-rated puzzles you've had prior.

Be sure to submit the appropriately-named and formatted files persuant to stated pctX project specifications (especially where a solve4-category puzzle is concerned).

SUBMISSION

The DEADLINE FOR SUBMISSION of this EoCE is 11:59:59pm EDT (that's 23:59:59 in 24-hour time) Thursday, May 14th, 2026. This is the ultimate deadline for any and all coursework. There is no "late", only "too late". Don't be that person, not with this.

I would highly recommend not waiting until the last moment (or even the last week) to start on this. It has been released weeks in advance, with the intention that you chip away at it a little bit at a time, over the course of weeks.

As with the projects and other deliverables this semester, you can submit early (and worthwhile, early submissions or extra work can receive up to 7 bonus points (applicable to the EoCE grading component)), and also submit as many times as you desire. Note that when you submit, that resets the timestamp from which I will evaluate any early submission bonus points or on-time eligibility.

Eligibility of any received bonus points on the EoCE are ultimately up to my decision: if you have genuinely put forth just and honest effort that is worthy of this undertaking, you will likely receive any eligible bonus points as described. If you are more calculating and avoiding of work in your EoCE efforts, I reserve the right not to grant any bonus points.

Also, if I notice any cases of rule violations (people overhelping each other instead of letting each individual complete the EoCE on their own accord and ability), you risk forfeiting any/all bonus points or even any credit for the section(s) that you violated the rules on.

Additionally:

  • Solutions not abiding by spirit of project will be subject to a 50% overall deduction
  • Solutions not utilizing descriptive why and how comments will be subject to a 50% overall deduction
  • Solutions not utilizing indentation to promote scope and clarity will be subject to a 50% overall deduction
  • Solutions not organized and easy to read are subject to a 50% overall deduction

Good luck!