30 lines
562 B
C++
30 lines
562 B
C++
#pragma once
|
|
#include "Transport.h"
|
|
#include <string>
|
|
#include <iostream>
|
|
|
|
class Car : Transport
|
|
{
|
|
public:
|
|
std::string make;
|
|
std::string model;
|
|
int year;
|
|
|
|
Car(TransportMode value, std::string make, std::string model, int year) : Transport(value) {
|
|
this->make = make;
|
|
this->model = model;
|
|
this->year = year;
|
|
};
|
|
|
|
void getInfo() {
|
|
std::cout << "Car Info:\n" << \
|
|
"Make: " << this->make << "\n" <<\
|
|
"Model: " << this->model << "\n" <<\
|
|
"Year: " << this->year << "\n\n";
|
|
};
|
|
|
|
void move() override {
|
|
std::cout << "Car is moving...\n";
|
|
};
|
|
};
|