Vending Machine

Advanced C++ Programming & Data Structures

Vending Machine Project

Project Overview

This project involved developing a fully-functional C++ vending machine simulator for a fictional pastry company. The primary focus was on implementing robust programming techniques, clean code, and dynamic memory management while following modern C++14 standards. The system simulates real-world vending operations with comprehensive state management, file persistence, and error handling.

Project Scope & Requirements

Technology Stack:

Key Objectives & Skills Demonstrated

Implementation Highlights

Custom Data Structures

Built from scratch without using STL containers:

Core Features

Architecture

The system follows a modular design with clear separation of concerns:

Personal Contributions

As a key member of the development team, I was responsible for:

Testing & Quality Assurance

The project includes extensive automated testing to ensure reliability and correctness:

Challenges & Solutions

Challenge: Managing complex state transitions in a vending machine with multiple concurrent operations (coin insertion, product selection, change calculation).

Solution: Implemented a robust state machine pattern that clearly defines valid state transitions and prevents invalid operations, ensuring program stability even under edge cases.
Challenge: Implementing custom linked lists without using STL, requiring manual memory management and pointer manipulation.

Solution: Designed careful allocation/deallocation strategies with thorough testing to achieve zero memory leaks, verified with Valgrind.
Challenge: Validating complex file formats with multiple delimiters and data types, handling malformed input gracefully.

Solution: Built comprehensive validation logic that checks file structure, data types, and constraints before loading, providing meaningful error messages.
Home