This repository contains a comprehensive collection of projects developed during the Advanced Programming course, demonstrating expertise in object-oriented design, polymorphism, inheritance, recursive algorithms, backtracking, greedy scheduling, command processing, and large-scale data management. Each project showcases different aspects of C++ development and software engineering principles.
- Project A7 – Fantasy Football System
- Project A6 – Driver Mission Management System
- Project A4 – Employee Salary Management System
- Project A3 – Weekly Course Scheduler
- Key Skills & Technologies
- Building & Running
A full‑featured fantasy football platform that simulates team management, player scoring, league standings, and user competitions. This two‑phase project builds a complete backend system with user authentication, transfer windows, budget management, and automated scoring based on real match statistics.
Initial system setup with CSV data ingestion, user authentication, team management, and reporting commands.
- CSV Data Import:
premier_league.csv– Team rosters with player positions and prices.weeks_stats/week_*.csv– Match results, injuries, yellow/red cards, and player performance.
- User Authentication:
signup– Register a new fantasy team (unique team name).login/logout– Session management for users.register_admin– Admin login (default credentials:admin/123456).
- Public Queries (GET):
team_of_the_week [?week_num]– Best players by position for a given week.players ? team_name <team> [+gk/df/md/fw] [+ranks]– Roster details with optional filtering and ranking.league_standings– Full league table with points, goals for/against.matches_result_league [?week_num]– Match results for a specific week.users_ranking– Rankings of all fantasy teams by total points.
- User Commands (POST):
buy_player ? name <name>– Purchase a player (position‑slot validation, availability checks).sell_player ? name <name>– Remove a player from the fantasy team.squad [?fantasy_team <name>]– Display current team composition and total points.
- Admin Commands:
open_transfer_window/close_transfer_window– Control trading periods.pass_week– Advance to the next week, updating scores and standings.
Advanced scoring engine that calculates player ratings using mathematical formulas, adds budget constraints, captain bonuses, and enriched player statistics.
- Scoring System (Polymorphic Design):
- Base points by position (Goalkeeper: 3, Defender: 1, Midfielder: 0, Forward: 0).
- Match result bonuses (Win: +5, Draw: +1, Loss: -1).
- Clean sheet bonuses (GK: +5, Defender: +2, Midfielder: +1).
- Goal/Assist points (Defender: 4/3, Midfielder: 3/2, Forward: 3/1).
- Own goal penalty: -3.
- Directional defensive adjustments (left/right/center matching).
- Sigmoid normalization:
A(x) = (1 / (1 + e^(-x/6))) × 10.
- Budget System:
- Initial budget: $2500.
- Each player has a price (extracted from CSV).
- Buy/Sell operations adjust the budget accordingly.
- Captain Mechanic:
set_captain ? name <name>– Designate a captain (double points).- Visual indicator
(CAPTAIN)in squad output.
- Enhanced Player Stats:
- Goals, assists, clean sheets displayed per player.
- Team cost calculation in squad view.
- Availability Validation:
- Red card suspension.
- Three‑yellow‑card accumulation (resets after 3).
- Injury in the last 3 weeks.
- Polymorphic Score Calculation:
ScoreOfGoalKeeper,ScoreOfDefender,ScoreOfMidfielder,ScoreOfForwardinherit from aScorebase class, each implementing position‑specific scoring rules. - Command Processing:
Processclass handles GET/POST routing, token parsing, and error responses. - Data Persistence:
ReadLeagueTeamsDataandReadWeeksDataclasses manage CSV ingestion with semicolon/comma parsing. - Fantasy Team Management:
FantasyTeamtracks roster, budget, captain, and weekly performance history viaPreviousWeeksnapshots. - League Ranking:
LeagueRankcomputes standings with tie‑breakers (points → goal difference → goals for → alphabetically).
- C++11 (STL:
vector,string,algorithm,fstream,iomanip,cmath,memoryfor smart pointers) - Multi‑file project with
Makefile - CSV parsing with custom delimiters
A polymorphic mission management system for ride‑hailing drivers, supporting time‑based, distance‑based, and count‑based missions with dynamic progress tracking and reward mechanisms.
The system manages predefined missions that drivers can accept. Each mission has a start/end timestamp, a target (minutes, meters, or trip count), and a reward. Drivers complete missions by recording rides, and the system automatically tracks progress, completes missions, and calculates rewards.
- Mission Types (Polymorphic Inheritance):
TimeMission– Complete a specified number of minutes of riding within the mission timeframe.DistanceMission– Travel a specified distance (in meters) within the timeframe.CountMission– Complete a specified number of trips within the timeframe.
- Mission Management:
add_time_mission,add_distance_mission,add_count_mission– Create new missions (duplicate ID validation, time validation).
- Driver Assignment:
assign_mission <mission_id> <driver_id>– Assign a mission to a driver (creates driver if new).- Prevents duplicate mission assignments per driver.
- Ride Recording:
record_ride <start_timestamp> <end_timestamp> <driver_id> <distance>– Record a completed ride.- Automatically checks and completes missions based on the ride data.
- Outputs completed missions for the driver.
- Status Reporting:
show_missions_status <driver_id>– Display all missions (ongoing/completed) for a driver, sorted by start timestamp.
- Polymorphic Design:
Missionis an abstract base class with pure virtualdoes_the_ride_end_this_mission()andmake_copy_of(). Derived classes (TimeMission,DistanceMission,CountMission) implement specific completion logic. - Copy‑on‑Assignment: Missions assigned to drivers are copied (using
make_copy_of) to maintain independent progress tracking. - Driver‑Centric Storage:
Driverclass maintains a vector of assigned missions. - TaxiCompany Facade: Central class manages mission/driver storage, validation, and delegation.
- Processing Layer:
Processingclass handles command parsing, input validation, and delegates toTaxiCompany.
- C++11 (STL:
vector,string,algorithm,exception) - Multi‑file project with
Makefile - Interactive command‑line interface
A full-featured command-line application that processes employee work hours, team structures, and salary configurations from CSV files, then generates detailed financial reports.
The system manages employees, their working hours (over 30 days with multiple intervals per day), team memberships, and salary parameters (base salary, hourly rate, overtime rate, tax percentage). It supports dynamic updates to working hours and salary configurations via interactive commands.
- CSV Data Ingestion: Reads
employees.csv,working_hours.csv,teams.csv, andsalary_configs.csv. - Salary Calculation: Computes base salary, overtime, bonuses (team‑based percentage), and tax with proper rounding.
- Reporting Commands:
report_salaries– list all employees with total hours and earnings.report_employee_salary <id>– detailed breakdown (salary, bonus, tax, absent days).report_team_salary <team_id>– team summary and member earnings.report_total_hours_per_day <start> <end>– total working hours per day in a range.report_employee_per_hour <start_hour> <end_hour>– average number of active employees per hourly period.
- Configuration Updates:
show_salary_config <level>– display current salary parameters for a level.update_salary_config <level> ...– modify parameters (supports-for unchanged values).update_team_bonus <team_id> <percentage>– change team bonus percentage.
- Dynamic Working Hours:
add_working_hours <emp_id> <day> <start> <end>– add a new interval with overlap validation.delete_working_hours <emp_id> <day>– remove all intervals for a specific day.
- Bonus Teams:
find_teams_for_bonus– identifies teams meeting minimum working hours and variance criteria.
- Object‑Oriented Design: Separate classes for
Employee,Team,SalaryGiven(salary configuration), andSoftwareSalary(business logic). - Data Encapsulation: Each class manages its own data and provides accessor/mutator methods.
- CSV Parsing: Custom line‑by‑line parsing with delimiter handling.
- Command Dispatcher: Central
input_handling()routes commands to appropriate methods.
- C++11 (STL:
vector,string,fstream,sstream,algorithm,cmath) - Standard I/O for interactive command processing
A greedy scheduling system that assigns teachers to course sessions (two classes per course) across a 5‑day week, respecting teacher availability and time‑slot constraints.
Given a set of teachers (with names, free days, and teachable courses) and courses (with two scheduled days and fixed start/end times), the program must produce a weekly timetable. Each course has two 1.5‑hour sessions on different days. The scheduler selects the most suitable teacher using a heuristic: teachers who can teach the course, are free on both course days, have fewer free days overall, and are alphabetically first.
- Input Parsing: Reads teacher and course data from standard input.
- Greedy Assignment: For each time slot (07:30, 09:30, 11:30) on each day, the algorithm picks the best available teacher for eligible courses.
- Conflict Resolution: Prevents a teacher from being assigned to two overlapping classes on the same day.
- Fallback Handling: If no teacher is found for a course, it is marked as
"Not Found". - Output Format: Prints each course (alphabetically sorted) followed by the assigned teacher and time period (e.g.,
"07:30 09:00"), or"Not Found"if unavailable.
- Structured Data:
Teachers,Course,Schechule, andclass_finalstructs. - Modular Functions: Each step (teacher selection, conflict checking, alphabetical sorting) is broken into small, reusable functions.
- Heuristic Chain: Teacher selection follows a priority chain: subject match → day availability → fewest free days → alphabetical order.
- C++11 (STL:
vector,string,algorithm,sstream) - Console I/O
- C++11 – STL containers, algorithms, file streams, string manipulation, smart pointers.
- Object‑Oriented Design – Encapsulation, inheritance, polymorphism, abstract base classes.
- Polymorphism & Inheritance – Mission scoring systems, fantasy football scoring, salary calculations.
- Algorithmic Thinking – Greedy heuristics, backtracking, recursion, Catalan numbers, sorting, ranking.
- Data Processing – CSV parsing, dynamic data structures, in‑memory updates, file I/O.
- Command‑Line Interface – Interactive command parsing, tokenization, validation.
- State Management – Session handling, transfer windows, week‑based progression.
- Mathematical Modeling – Sigmoid normalization, statistical calculations (variance, averages).
All projects are compiled with g++ using the C++11 standard.
# Example for A7 (Fantasy Football)
cd A7-810101456
make
./futballFantasy.out
# Example for A6 (Driver Missions)
cd A6-810101456
make
./main
# Example for A4 (Salary Manager)
g++ -std=c++11 A4-810101456.cpp -o salary_manager
./salary_manager <path_to_data_folder>
Each project reads from standard input or specified file paths as described in its problem statement.