+
+using namespace std;
+
+
+class MusicalInstrument {
+public:
+ virtual void play() { cout << "Playing instrument" << endl; }
+ virtual void reset() { cout << "Resetting the instrument" << endl; }
+ virtual ~MusicalInstrument() {};
+};
+
+class Machine {
+public:
+ virtual void start() { cout << "Starting the machine" << endl; }
+ virtual void reset() { cout << "Resetting the machine" << endl; }
+ virtual ~Machine() {};
+};
+
+class Synthesizer : public Machine, public MusicalInstrument {
+public:
+ virtual ~Synthesizer() {};
+};
+
+
+int main() {
+ Synthesizer* pSynth = new Synthesizer();
+
+ pSynth->play();
+ pSynth->start();
+ pSynth->MusicalInstrument::reset();
+
+ delete pSynth;
+
+ return 0;
+}
\ No newline at end of file
diff --git a/test.bmp b/test.bmp
new file mode 100644
index 0000000..9e97e08
Binary files /dev/null and b/test.bmp differ
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy