All work

Software engineering

A train schedule system in modern C++.

An object-oriented C++ application for storing and searching train schedules, built the full software-engineering way: functional and non-functional requirements, UML class and sequence diagrams, an inheritance-based class design, and a Boost.Test unit-testing suite checked against a requirements test plan.

A departure board at a railway station
C++
Object-oriented design
UML
Class and sequence diagrams
Boost.Test
Unit and requirement testing
Team of 5
Specification-driven build

What it does

The system models a railway timetable and lets a user search it: store services and their times, query by route or time, and present results through a small UI layer. It started from a written specification, with functional and non-functional requirements that justified every feature, then moved through design, implementation and a documented test pass.

Architecture

  • Schedule

    Holds the timetable data and the services it contains.

  • SearchEngine

    Queries the schedule by route and time, returning matches.

  • UIHandler

    Drives interaction and presents results to the user.

Designed against a test plan.

Boost.Test unit test (illustrative)
#define BOOST_TEST_MODULE schedule_tests
#include <boost/test/included/unit_test.hpp>
#include "Schedule.h"

BOOST_AUTO_TEST_CASE(search_returns_matching_service)
{
    Schedule s;
    s.addService("Waterloo", "Reading", "08:32");
    SearchEngine engine(s);

    auto results = engine.findByRoute("Waterloo", "Reading");
    BOOST_CHECK_EQUAL(results.size(), 1u);
    BOOST_CHECK_EQUAL(results.front().departure(), "08:32");
}

Reviewer’s notes

“Good level of complexity in terms of coding. Readability of code is good with relevant variable naming and comments. Implementation of inheritance. Implementation reflects design. Well done!”

“Good test plan, evidence of testing is convincing. Good use of Boost and test code.”