alle funktion definiert glaub ich

This commit is contained in:
Tobias Kachel 2026-05-14 11:11:15 +02:00
parent 9f0b35451b
commit 12eaaaa18d
4 changed files with 28 additions and 3 deletions

View File

@ -1,3 +1,8 @@
#pragma once #pragma once
class Luftfahrzeug{ #include "Verkehrsmittel.h"
class Luftfahrzeug : Verkehrsmittel{
private:
int maxFlughöhe;
public:
std::string text();
}; };

View File

@ -1,3 +1,9 @@
#pragma once #pragma once
#include "Verkehrsmittel.h"
class PKW{}; class PKW{
private:
int anzahlTüren;
public:
std::string text();
};

View File

@ -1,3 +1,9 @@
#pragma once #pragma once
#include "Verkehrsmittel.h"
class Radfahrzeug{}; class Radfahrzeug : Verkehrsmittel{
private:
int anzahlRäder;
public:
std::string text();
};

View File

@ -1,4 +1,12 @@
#pragma once #pragma once
#include <string>
class Verkehrsmittel{ class Verkehrsmittel{
private:
int posX = 0;
int posY = 0;
int position[2] = {posX,posY};
public:
void bewege(int x, int y);
virtual std::string text();
}; };