
- •Coursework thesis
- •Task for coursework
- •Abstract
- •List of abbreviations
- •Introduction
- •Domain analysis
- •Designing the system
- •Interface classes iSerializible, iEmissionable and iCloneable
- •Class for transport information
- •Bus, Plane, Train classes
- •Data storing. Transport schedule class
- •Array of pointers. Container class.
- •User Interface Design
- •Software implementation
- •Clock and Time classes.
- •Coordinates structure implementation
- •StationInfo structure implementation
- •IEmissionable, iSerializable and iCloneable implementation
- •TransportInfo class implementation
- •Bus, Plane, Train class implementation
- •TransportSchedule class implementation
- •Conclusions
- •References
- •Appendix a File Time.H
- •File Time.Cpp
- •File Clocks.H
- •File Clocks.Cpp
- •File iSerializable.H
- •File iEmissionable.H
- •File iCloneable.H
- •File stdafx.H
- •File stdafx.Cpp
- •CoordinatesData.Json
- •File transports.Csv
- •File Coordinates.Cpp
- •File main.Cpp
- •File Route.Cpp
- •File Route.H
- •File StationInfo. Cpp
- •File StationInfo.H
- •File TransportSchedule.H
- •File TransportSchedule.Cpp
- •File PtrArray.Cpp
- •File TransportInfo.Cpp
- •File TransportInfo.H
- •File Bus.H
- •File Bus.Cpp
- •File Plane.H
- •File Plane.Cpp
- •File Train.H
- •File Train.Cpp
- •Appendix b
Domain analysis
Task of this project is to develop a program to manage transportation schedules for a company that operates buses, trains, and other modes of transport. The system should allow users to create, modify, and view schedules for different routes and modes of transportation.
In the program’s domain, we can identify several key entities such as Station, Route, Vehicle, Schedule, Iterator, Time, Container of transports, Coordinates. These entities and their relationships form the core of the system.
Time to represent the arrival or departure time in format ‘hh:mm:ss’.
Coordinates represent the location of a station using longitude and latitude.
A station represents an information about starting or ending location of the vehicle. Its time when it’s at the station, coordinates, and the platform.
A Route represents a predefined path between two or more locations, characterized by its start and end points, time and total fee.
A Vehicle represents a specific mode of transportation, such as a bus, train, or airplane. Each vehicle has a unique identifier, fee, departure and destination stations, time, and platform. Also, vehicle will have emission factor that will depend them on the amount of carbon emission made by a specific vehicle.
A Schedule represents a bunch of the particular planned routes with a specific vehicle over a given period.
Container of transports is a collection of objects of one type. In our case is used to store all the transports used in Schedule object.
Iterator is an object which allows programmer to traverse the container. Hence, container in developed program uses iterator. Iterator has operators which are needed to traverse the container in appropriate way, and it has one field representing pointer to the certain element of container.
The system should allow users to find the nearest route from a specific departure to a specific destination, as well as being able to see all the transports at the route and in general.
Overall, the TransportSchedule system aims to help users find the fastest route for a specific destination and departure.
Figure 1.1 - Objects of considered subject area and links between them
Within task variant it’s necessary to find the shortest route from one station to another. For this purpose, TransportSchedule class must contain array of transports which must contain vehicle which must contain Information about station.
The vehicles implementation will be by using generalization. One general class to inherit from and which implements interfaces of serialization and emissionability to enforce transports to implement emission methods.
All objects except for Coordinates, Iterator and Container of vehicles must define input/output operators to work with data. Time class be comparable to find the shortest route essentially.
Designing the system
After analyzing subject area, we now can provide an approximate design of TransportSchedule system, separate interfaces from structures and classes, and define additional classes that will make work easier.