This repository contains all of my coursework from CMSC-140 - Introduction to Programming, where I learned the fundamentals of programming using C++. Each folder represents a classwork assignment or major project that I completed throughout the semester.
CMSC-140/
├── CW_1/ # Classwork 1 - Basic I/O
├── CW_2/ # Classwork 2 - Variables & Expressions
├── CW_3/ # Classwork 3 - Decision Structures
├── CW_4/ # Classwork 4 - Loops
├── CW_5/ # Classwork 5 - Functions
├── CW_6/ # Classwork 6 - Arrays Introduction
├── CW_7/ # Classwork 7 - Array Operations
├── CW_8/ # Classwork 8 - Sorting & Statistics
├── Project_1/ # Stock Transaction Calculator
├── Project_2/ # Movie Ticket Booking System
├── Project_3/ # Hotel Occupancy Calculator
├── Project_4/ # Employee Absence Report Generator
├── Project_5/ # Lo Shu Magic Square Validator
└── README.md
Here's a quick overview of the five major projects I built during this course:
| Project | Title | What It Does |
|---|---|---|
| Project 1 | Stock Transaction Calculator | Calculates profit or loss from stock transactions, factoring in broker commissions |
| Project 2 | Movie Ticket Booking System | Handles movie selection, age verification, ticket pricing, and change calculation |
| Project 3 | Hotel Occupancy Calculator | Computes occupancy rates and total revenue based on room types and pricing |
| Project 4 | Employee Absence Report | Tracks employee absences across departments and generates summary reports using file I/O |
| Project 5 | Lo Shu Magic Square | Validates whether a 3x3 grid qualifies as a magic square using arrays and functions |
| Classwork | Focus Area |
|---|---|
| CW 1-2 | Getting started with C++ syntax, input/output, and basic data types |
| CW 3-4 | Control flow with if/else statements and loops (for, while, do-while) |
| CW 5 | Breaking code into reusable functions |
| CW 6-7 | Working with arrays to store and manipulate collections of data |
| CW 8 | Sorting algorithms and calculating statistics (max, min, average) |
- Language: C++
- Key Concepts: Variables, I/O, Conditionals, Loops, Functions, Arrays, File Handling
To compile and run any program in this repo:
- Open a terminal and navigate to the folder you want to run
- Compile the source file:
g++ -o program filename.cpp
- Run it:
./program
CMSC-140 was my first programming course, and it gave me a solid foundation in computational thinking and problem-solving. Through hands-on projects and weekly assignments, I learned how to break down problems, write clean code, and debug effectively.
This repository is for educational purposes. Feel free to use it as a reference for learning C++ basics.