Compare commits
4
Commits
A6
..
69411ac10f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69411ac10f | ||
|
|
e56437fb06 | ||
|
|
3a509f18ed | ||
|
|
529a8606f2 |
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB |
@@ -5,6 +5,7 @@ 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();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
#include "Klavier.h"
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
Klavier::Klavier() { cout << "Konstruktor: Klavier()" << endl; }
|
||||
Klavier::~Klavier() { cout << "Destruktor: ~Klavier()" << endl; }
|
||||
void Klavier::spielen() { cout << "Klavier klimpert" << endl; }
|
||||
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
#include "Musikinstrument.h"
|
||||
class Klavier : Musikinstrument {
|
||||
public:
|
||||
Klavier();
|
||||
virtual ~Klavier();
|
||||
virtual void spielen();
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
#include "Musiker.h"
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include "Musiker.h"
|
||||
#include "Musikinstrument.h"
|
||||
#include <string>
|
||||
|
||||
class Musiker {
|
||||
private:
|
||||
std::string name;
|
||||
const Musikinstrument instrument;
|
||||
|
||||
public:
|
||||
Musiker();
|
||||
Musiker(std::string iname);
|
||||
virtual ~Musiker();
|
||||
void weiseInstrumentZU(const Musikinstrument *instrument);
|
||||
void spielen();
|
||||
std::string liefereName();
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "Musikinstrument.h"
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
Musikinstrument::Musikinstrument() {
|
||||
cout << "Konstruktor: Musikinstrument()" << endl;
|
||||
}
|
||||
Musikinstrument::Musikinstrument(string name) {
|
||||
this->name = name;
|
||||
cout << "Konstruktor: Musikinstrument(string name): " << name << endl;
|
||||
}
|
||||
Musikinstrument::~Musikinstrument() {
|
||||
cout << "Destruktor: Irgentein Musikinstrument" << endl;
|
||||
}
|
||||
void Musikinstrument::spielen() {
|
||||
cout << "Irgentein Musikinstrument erklingt irgentwie" << endl;
|
||||
}
|
||||
string Musikinstrument::liefereName() { return name; }
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
class Musikinstrument {
|
||||
private:
|
||||
std::string name;
|
||||
|
||||
public:
|
||||
Musikinstrument();
|
||||
Musikinstrument(std::string name);
|
||||
~Musikinstrument();
|
||||
virtual void spielen();
|
||||
std::string liefereName();
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
#include "Orchester.h"
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#include "Musiker.h"
|
||||
#include <vector>
|
||||
|
||||
class Orchester {
|
||||
private:
|
||||
std::vector<Musiker> musiker;
|
||||
|
||||
public:
|
||||
Orchester();
|
||||
virtual ~Orchester();
|
||||
void spielen();
|
||||
void hinzufügen(Musiker const *musiker);
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "Trompete.h"
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
Trompete::Trompete() { cout << "Konstruktor: Trompete()" << endl; }
|
||||
Trompete::~Trompete() { cout << "Destruktor: ~Trompete()" << endl; }
|
||||
void Trompete::spielen() { cout << "Trompete trötet" << endl; }
|
||||
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include "Musikinstrument.h"
|
||||
|
||||
class Trompete : Musikinstrument {
|
||||
public:
|
||||
Trompete();
|
||||
virtual ~Trompete();
|
||||
virtual void spielen() override;
|
||||
};
|
||||
Reference in new issue
Block a user