25 lines
573 B
C++
25 lines
573 B
C++
//
|
|
// Created by Nik on 11/04/2022.
|
|
//
|
|
|
|
#include "Vagon.h"
|
|
|
|
Vagon::Vagon(double dolzina, double sirina, TipVag tip) : Prikljucek(dolzina,sirina), tip(tip) {}
|
|
|
|
std::string Vagon::tipV() const {
|
|
switch (tip) {
|
|
case TipVag::Potniski:
|
|
return "Potniski";
|
|
case TipVag::Tovorni:
|
|
return "Tovorni";
|
|
default:
|
|
return "?";
|
|
}
|
|
}
|
|
|
|
std::string Vagon::toString() const {
|
|
return "dolzina: " + std::to_string(dolzina) + " sirina: " + std::to_string(sirina) + " Tip Vagona: " + tipV() + "\n";
|
|
}
|
|
|
|
|