Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
Dabei hast du noch nichtmal gesagt wie die Aufgabe überhaupt genau lautet...Manda hat gesagt.:Leute? Keiner mehr da? Ich werde noch wahnsinnig mit dieser Aufgabe
class GeomObjekt {
public:
virtual double berechneUmfang() const = 0; // rein virtuell == keine Implementierung hier
};
class Rechteck : public GeomObjekt {
int a, b;
public:
Rechteck (int seiteA, int seiteB) : a(seiteA), b(seiteB) {}
virtual double berechneUmfang() const {
return 2 * a + 2 * b;
}
};
class Kreis : public GeomObjekt {
int r;
public:
Kreis (int radius) : r(radius) {}
virtual double berechneUmfang() const {
return ...;
}
};
...
void printUmfang(const GeomObjekt& o) {
cout << o.berechneUmfang() << endl;
}
Rechteck r(3, 5);
Kreis k(5);
printUmfang(r);
printUmfang(k);