Week 5 Class 8 Tue Feb 10 Posted: Feb 10
Announcements
Project 1 v1b Feedback for Project 1 v1b is posted as issues in your GitHub repository:
Do not change tag v1b.
You will need to fix these issues at some point.
Project 1 v1c Feedback for Project 1 v1c is posted as issues in your GitHub repository:
Project 1 v1d
Exercise 10a: Buffering and Exercise 10b: Software Design Characteristics Quiz.
Agenda
Exercise 20: Rainfall V
Make the same commits in your repository.
Unless otherwise noted, exercises are due by 3:30 pm on Wed Feb 11
Week 4 Class 7 Thu Feb 05 Posted: Feb 05
After Class
Announcements
git pull it into your local repository (even in a codespace).GitHub Codespaces I updated the image, srcml/codespaces, used by our projects in the codespace container. Besides new versions of the installed packages, including cmake, you can now use the manual utility, man g++, and even man srcml.
When an image is updated, existing codespaces are still using the old image. To use the new image, you must start a new up a new codespace. You also probably want to delete the old one so you don't get confused. Make sure you committed and pushed in the codespace
Exercise 21: Include Guard Name Quiz Available after class from a link in Brightspace.
You may want to review your notes on include guard names before taking it. Answers must be exact.
Agenda
Exercise 23: Role of Include Files
For each of the following, write the code necessary to call the function. Include all error handling:
An include file is not for the developer of the corresponding .cpp file. It is so that the developer calling the function can use it, and use it properly. It has to be sufficient for the developer to call the function, but not include anything more.
Facts
The results of part v1b is that overall there is a misunderstanding of the purpose of an include file.
From the function caller's perspective:
From the function developer's perspective:
Exercise 20: Rainfall V Continuing on using the workflow from Rainfall I. As before, you can follow along and see the commits that I make in class:
Unless otherwise noted, exercises are due by 3:30 pm on Monday, Feb 9
Week 4 Class 6 Tue Feb 03 Posted: Feb 03
After Class
Announcements
Project 1 v1a Scores (out of 20 possible) are in Brightspace for Project 1. The feedback is in GitHub in the Issues tab of your repository. Issues include:
Do not expect that every part (e.g., v1b) will be graded before the next part is due. This part is straightforward. The remaining parts involve more complex coding. Also, for some parts, I want to grade the parts together.
The first step of Project 2 will be to fix these issues. You can fix these issues now or later. For small changes, I suggest now. Use a commit message that starts with "Fix". After the issue is fixed, close the issue.
Agenda
You will not be asked to explain or define any XML terminology as part of any exam. However, to discuss the project's problem domain, we require this terminology.
You need to understand that the parts of XML are a concern, the implementation of an XML parser is another concern, and the specific element names for srcML are another concern. We will cover the idea of a concern later on.
Exercise 20: Rainfall V Continuing on using the workflow from Rainfall I. As before, you can follow along and see the commits that I make in class:
Delayed Until Next Class
Exercise 21: Include Guard Name Quiz Available after class from a link in Brightspace.
Delayed Until Next Class
You may want to review your notes on include guard names before taking it. Answers must be exact.
Unless otherwise noted, exercises are due by 3:30 pm on Wed Feb 04.
If you did not take the Exercise 8: For Statement Quiz nor do Exercise 17: For Semantics I, then you cannot do this exercise, as it is based on your work on the quiz.
In your for semantics repository is a file ForSemantics.cpp. It has a set of separate test cases with some setup, the code to evaluate, and an answer checked via an assert(), e.g.,
Each test case is in its own block statement to isolate its scope. The test cases are scenarios of using the original code from the quiz, followed by a test case with your individual answers. There are multiple scenarios for each example/answer from the quiz.
One special case is for Q3, which gave you macros (e.g., INCR) instead of the actual code. For that one, we used the preprocessing #define to make them into statements.
This is a non-standard use of preprocessing statements, so don't treat it as a general solution.
A CMake configuration is provided. So use the standard procedure to configure and build. There is no target run provided in the Makefile, so you will have to run the test program on the command line.
So your job is to:
i in the original for-loop, it should be i in the semantically-equivalent while-loop. Not count, vCount, or q. Besides, i is the standard name for a counter in a loop.int total = 0, i = 0;You can only change what is between the // @START and // @END comments. Changes to any other places in the code will result in a 0 on the exercise.
Week 3 Class 5 Thu Jan 29 Posted: Jan 29
After Class
Project 1: v1a Scores for v1a are in Brightspace. Any feedback is in the form of issues in your repository.
By Project 2, you will need to fix these issues. However, you can go ahead and fix them now. If you fix an issue, then mention it in the commit messages, and Close the issue in GitHub.
Announcements
Agenda
With a few exceptions, the use of proper Git Commit messages is not a part of the grade for the projects or exercises. However, you should try to follow the rules because it is:
Exercise 16: Rainfall IV
Continuing on using the workflow from Rainfall I
As before, you can follow along and see the commits that I make in class:
Exercise 17: For Semantics I
The For Statement Quiz had three for statements that you had to convert to using the while statement:
No one got the entire conversion correct. Given the question's setup, many got the first two on a technicality, but no one got the third one completely correct. So I am going to have you fix your answers.
For part I, you only need to create the repository for the exercise. Once you do that, I can give you the problem starting with your answers on the For Statement Quiz. In part II (not assigned yet), you will fix the conversion to a while so it works correctly.
The reason for the split between parts I and II is that I cannot provide custom code until after the repository is created, and only you can create the repository.
If you did not take the For Statement Quiz, then you cannot do this exercise as it is based on your work on the quiz.
Unless otherwise noted, exercises are due by 3:30 pm on Fri Jan 30
Week 3 Class 4 Tue Jan 27 Posted: Jan 27
Announcements
GitHub Classroom Error
If you get the following:

Go to your GitHub account. From the icon on the far right top corner, select "Organizations". There you will see an invitation to accept the project.
make run
make so they cannot use make run.run for the Makefile, i.e., make run. This was provided because the main program, rainfall, required an input file (the rain data) sent via standard input.make run is often given as an example, along with demo data. It is not expected that make run is the only way to run the program.make run, do not add one to the CMake files (this is not DevOps). Run the program directly.Agenda
Exercise 10: Software Design Characteristics Quiz
Link to form provided in Brightspace during the quiz time.
All project due dates are 11:59:59 pm.
Build and run the Project 1 srcfacts program performing the following:
cmakemakemake runmakeEnter the following command:
To demonstrate this, you will record a terminal session using asciinema, as we did in Exercise 10: IOBuffering.
IMPORTANT The URL should not contain "connect" or be a local file. Test your URL in a browser verifying that it shows the session you recorded. An incorrect URL will receive a 0.
Exercise 13: Rainfall III
Continuing on using the workflow from Rainfall I
As before, you can follow along and see the commits that I make in class:
If you have any questions or issues, make sure to contact me.
Unless otherwise noted, exercises are due by 3:30 pm on Wed Jan 28
To fix bugs and add new features to software, you have to understand the source code. One approach is to count things, such as the number of statements, functions, classes, expressions, and LOC (Lines Of Code). The program srcfacts produces a report of these counts for a C++ program.
Writing code in a program to directly parse C++, i.e., identify the syntactic parts of the code, is very difficult. So, the srcfacts program does not parse the C++ source code. It uses another tool, srcML, to convert the C++ source code into an XML format. The srcfacts program inputs this XML format, parses the XML while collecting counts of parts of the input code, and produces the report. The input has to be in the srcML format, e.g., demo.xml, however it can be compressed or part of an archive, e.g., demo.xml.zip, linux.xml.gz.
The srcfacts.cpp program is one large, main() function using almost no design features. It is extremely fast; for example, it can produce a report on the entire Linux kernel (verison 6.18.7, 60,392 source-code files, an 4.7 GB file in the srcML format) in under 8 seconds. However, in its current form, it is not easy to debug the XML parsing, add additional program element counts, or even understand what is going on. It includes code for parsing all parts of XML, but it would not be easy to adapt the XML parsing code for another purpose, e.g., another report. The only way to reuse this code is by copy/paste reuse. Overall, it has the following:
| Design Characteristic | Level |
|---|---|
| Scalability | Very High |
| Performance | Very High |
| Portability | Medium |
| Usability | Medium |
| Modularity | Very Low |
| Extensibility | None |
| Reusability | None |
| Maintainability | None |
Your task is to take the srcfacts code, improve the overall design, and extract the XML parsing part of the code. When completed, a set of functions in the files xml_parser.hpp and xml_parser.cpp will handle as much XML parsing as possible, while the main program, srcfacts.cpp, generates the report using the XML parser functions for parsing.
The steps (in order) with the associated (git) tag are:
Tag v1a: Without changing the design, add the code necessary for the report to include the number of return statements. First see how the other counts are collected, then use it as a guide. Do not make any other changes to the project. The heading in the table must be "Returns". Due Jan 30
Tag v1b: Move the refillContent() function into the separate refillContent.hpp and refillContent.cpp files. The build is already configured for these files. Due Feb 4
Tag v1c: Apply the specific design changes from the Coding Practices Task List (an issue in your repository). As you verify that the code follows the practices given, check them off. Once you have completed all of them, close the issue. Due Feb 9
Tag v1d: Extract a set of (free) functions to handle the low-level details of the XML parsing. Put the declarations into xml_parser.hpp and the definitions into xml_parser.cpp. Extract one function at a time, i.e., each commit can only include a single extracted function. Due Feb 13
Tag v1e: Add the necessary code to count the number of line comments and literal strings. The headings in the table must be "Line Comments" and "Strings". Due Feb 13
Your repository for this project is through GitHub Classroom, with a link on the Brightspace course page.
v1a must be completed before Step v1b.g++ and clang. An easy way to verify is with GitHub Codespaces.classes or structs created for this project. You are extracting a set of free functions. Any class you create to solve this problem now would not solve the primary problem of how the srcFacts code uses an XML parser.main() handles XML errors (invalid XML format) with a direct return 1; so the program exits with the status of 1. To exit the program from within any function, use exit(1); which requires the include file stdlib.h.git clone and git checkout.General Guidelines
Week 2 Class 3 Thu Jan 22 Posted: Jan 22
After Class
GitHub Classroom Error
If you get the following:

To fix, go to your GitHub account. From the icon on the far top corner, select "Organizations". There you will see an invitation to accept the project.
Rainfall II In class, I was committing to the feedback branch instead of the main branch. That his now fixed, so you will see the changes on the main branch. The Report1.md remains only the feedback branch.
Announcements
I posted a feedback report, Report1.md, in your repository under the branch feedback. I strongly suggest looking at it on GitHub. Enter this command from your source directory (not the build subdirectory):
I posted the scores and any additional comments in Brightspace
Report1.md Example report.
Points were taken off for:
Also, do not use term "assignment" or "exercise" in your code. We simulate working on real code.
If you have spacing or wording to fix, you can fix them. However, these commits must start with the word "Fix". Not "Fixing", "Fixed", or "fix", but "Fix".
TA: Mr. Sumaila Iddrisu si63@uakron.edu
Agenda
Notes: Software Design Characteristics
Note: In the next class meeting, I will give an exercise in quiz form that requires you to list all of the software design characteristics.
Exercise 8: For Statement Quiz
Completed during class.
This is an online form. Link will be in Brightspace.
Exercise 9: Rainfall II
Continuing using the workflow from Rainfall I
As before, you can follow along and see the commits that I make in class:
If you have any questions or issues, make sure to contact me.
Unless otherwise noted, exercises are due by 3:30 pm on Fri Jan 23
Build and run the program main. You will have to create a build directory, move to the build directory, run cmake, and then build using make. See the workflow for Rainfall I for the commands.
Now run the program and notice that the output of the debugging statement is not shown. If it does show, run it a few times.
So even though the program reached the output statement, the output using std::cout was buffered and the program crash prevented it from completion.
Record running the program and not seeing the debugging output in a terminal session using asciinema.
Now, change the debugging statement to use std::cerr. Rebuild your program, and run it again. This time, you will see the debugging output. Commit this change using the git command:
Make sure you git push and verify, via a web browser, that these changes are in your files at GitHub.
Record running the program and seeing the debugging output in a terminal session using asciinema.
Upload both asciinema URLs using the IOBuffering Form
To demonstrate this, you will record a terminal session using asciinema. It records the commands you enter and the output the command produces. asciinema is already installed in the GitHub Codespaces image. You can also install asciinema on Linux/WSL/macOS.
asciinema is relatively straightforward to use.
You can play, pause, skip, etc. You can also copy the commands as text. Note that the replay even includes your pauses and any delay as the command is run.
At the end of the terminal session, asciinema will show a URL. Anybody can use this URL to view the session. This is what you will submit for the exercise to the link in the exercise title.
IMPORTANT The URL should not contain "connect" or be a local file. Test your URL in a browser verifying that it shows the session you recorded. An incorrect URL will receive a 0.
Week 2 Class 2 Tue Jan 20 Posted: Jan 20
After Class
I posted a feedback report, Report1.md, in your repository under the branch feedback. I strongly suggest looking at it on GitHub:
I posted the scores and any additional comments in Brightspace
Points were taken off for:
Also, do not use term "assignment" or "exercise" in your code. We simulate working on real code.
If you have spacing or wording to fix, you can fix them. However, these commits must start with the word "Fix". Not "Fixing", "Fixed", or "fix", but "Fix".
Special Announcement
Our class will meet online today in Teams. During the meeting, please be muted, but leave your camera on if possible.
Our Team is CPSC 421-020 OOP 3:30 - 4:45 pm. You should see the meeting in your calendar. There is also a direct meeting link in Brightspace. If you have any problems, send a chat message in Teams or an email.
Announcements
Grades Exercises 1 - 4 are in Brightspace. Read the feedback.
Future exercise posting to Brightspace will not be announced. Delays will be.
Agenda
Exercise 5: Statement Design Quiz
You can follow along and see the commits that I make in class:
If you have any questions or issues, make sure to contact me.
Unless otherwise noted, exercises are due by 3:30 pm on Wed Jan 21
Take the starting rainfall.cpp code and make the changes that I make in class. This means the exact same code changes and exact commit message.
Your code is in a repository from GitHub Classroom:
Environment
Local
This would be on your own machine with local files.
First, you need to authenticate your local environment with GitHub: Guide: GitHub Authentication. This only has to be done once per environment, e.g. WSL on Windows.
Then you clone the repository. Cloning creates a local repository that is a copy of your repository at GitHub.
You can get the repo link from the button <> Code on GitHub, then under Local and HTTPS.
Cloning a repository creates a directory with the name of your repository, e.g., _rainfall-
GitHub Codespaces
GitHub Codespaces provides a development environment in the browser. When you create one from your GitHub Repository, you are already authenticated with GitHub and have a cloned repository, so you can start working right away.
You can start a Codespace from the <> Code button on GitHub, then under Codespaces.
Build Setup
Git Workflow on Rainfall
Note Your code must build and compile. If you have a build warning or error, fix these before making any more changes to the code.
Note You must commit each change that I make separately and use the exact commit message that I use in class
After Class
Class on Thursday, Jan 20 will be online in Teams.
You should see a meeting in your Teams Calendar. The name of our Team is _CPSC 421-020 OOP _.
I will also post a direct link in Brightspace.
Agenda
Campus is closed today, so no class.
I am not holding office hours, but am available for questions via email.
In in place of a class meeting, complete the following:
g on the slide page a Jump to slide appears so you can go directly to that slide.CMake & Ubuntu Versions
As stated in the Development Environment: Tools the cmake version must be 4.2.1 or higher. Some of you have less recent versions, even though the instructions stated you need to be at 4.2.1 for cmake. Follow the instructions to install the APT repository from Kitware (CMake people).
For Linux, upgrade your Ubuntu using:
You should also be on Ubuntu 24.04, not an older version. To convert, first upgrade as above, then enter the command:
Use the Development Environment: Tools to check your versions.
If you make any of these changes, then edit or fill out a new survey.
Week 1 Class 1 Tue Jan 13 Posted: Jan 13
Announcements
GitHub We use GitHub and GitHub Classroom in the class to manage source code for projects, exercises, and examples. You are required to have a GitHub account.
Optionally, you can apply for the Student Github Developer Pack and get a free GitHub Pro account. To apply, your account email can be a school account, or a personal account if you upload documents to prove your current enrollment status.
git commands to do so.g++ and cmake, so avoid relying on them.O'Reilly Online Learning The course textbook is available in O'Reilly Online Learning.
You do not have to be on the campus network (e.g., via VPN) to access O'Reilly Online Learning.
To access content, click the "Institution not listed?" link below the dropdown and enter your UA email. You will then create an account and use that account from now on.
For more information: Library LibGuide
Agenda
Exercise 2: Syllabus Crossword
Exercise 3: Development Environment Survey
The survey is available from the link of this exercise. There is nothing to upload to Brightspace.
This exercise is due by 1 pm on Thu, Jan 15.
Unless otherwise noted, exercises are due by 3:30 pm on Wed Jan 14
Greetings and welcome to CPSC 421 Object-Oriented Programming for Spring 2026.
GitHub In the class, we use GitHub and GitHub Classroom to manage source code for projects, exercises, and examples. You are required to have a GitHub account.
Optionally, you can apply for the Student Github Developer Pack and get a free GitHub Pro account. To apply, your account email can be a school account or a personal account if you upload documents to prove your current enrollment status.
See you on Tuesday, Jan 13 at 3:30 - 4:45 pm in Arts & Sciences (CAS) room 136