CPROGRM520-Notes
Course 2: Intermediate C++ Programming
These are my personal study notes for the second course in the C++ Programming Professional Certificate Program from the University of Washington. This course delves into modern C++ programming with a special emphasis on the Standard Template Library (STL).
In these notes, I've included information not just from the lectures but also from various online sources. I may omit some lecture content that I'm already familiar with, choosing instead to highlight topics I'm less comfortable with, such as threading — a subject which wasn't actually extensively covered in the lectures. As these notes were crafted in retrospect, please forgive any inaccuracies.
Table of Contents
Week | Topics |
---|---|
1 | Course Intro, Namespaces, and Move Operations |
2 | Templates, Three-Way Comparison Operator |
3 | UML Diagrams, Object-Oriented Design |
4 | STL Containers |
5 | STL Algorithms |
6 | Advanced STL |
7 | STL Functions and Utilities |
8 | Exceptions |
9 | Multithreading I |
10 | Multithreading II |
Homework Assignments: Hunt the Wumpus
Throughout this quarter, our main project is the development of a text-based adventure game titled Hunt the Wumpus. The gameplay involves navigating a series of rooms in the pursuit of the elusive Wumpus, with the aim of defeating it using a bow and arrow. Along the way, players must avoid pitfalls and the chance of being whisked away by bats to an unknown cave. The game concludes in victory when the Wumpus is vanquished but ends in defeat if the player succumbs to a pitfall or gets devoured by the Wumpus. This project offers a comprehensive exploration into game system design, and it's also incumbent upon us to devise unit tests that rigorously evaluate the functionality of our classes.
I like how the assignments were graded in this class. The homework submission process involves adhering to bi-weekly specifications (which essentially provide functional requirements) and making a pull request. Then, the instructor(s) evaluates our code, going through each line in detail, similar to the code reviews they conduct in their daytime jobs as SWEs. This approach has helped my understanding of quality coding practices.
For academic integrity reasons, I won't be posting my code here. However, I will provide a brief overview of the key concepts covered in each homework assignment. Here's a concise overview of the bi-weekly homework assignments:
Weeks | Classes and Structures Implemented | Key Concepts |
---|---|---|
1-2 | Denizen , Wumpus , Bat , Pit , Hunter , Arrow , DenizenIdentifier , DenizenProperties , and DenizenIdentifierHasher |
Overloading operators, abstract classes, three-way comparison operator, hash |
3-4 | Cave , Dungeon , Denizen , IRandomProvider , Context |
STL containers, explicit , auto , structure bindings, emplace , interface classes |
5-6 | - | Code modernization, unit tests, advanced STL usage |
7-8 | UserNotification , IGameStateChange , main() |
callbacks, std::function , std::variant , insert_or_assign , user interface |
9-10 | - | Exception handling |
Clarification on Content Creation
While my understanding of the subject matter originates from attending the class, the majority of my notes were based on the provided slides. These notes can be a bit messy and may potentially breach copyright terms. To have a digital, easily accessible version of my notes, I opted to work with ChatGPT to refine and present the content in a more organized manner. Given that these topics are common knowledge and widely discussed online, the information rendered by ChatGPT is generally trustworthy.