Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <stdio.h>
- #include <conio.h>
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- class Item {
- public:
- string item;
- Item(string i) {
- this -> item = i;
- }
- virtual string getType() { return "Standard item."; }
- virtual string build() = 0;
- };
- class Mechanism : Item {
- public:
- string build() {
- cout << "Builded" << endl;
- }
- };
- class Product : Mechanism {
- public:
- string getType() {
- return "Product";
- }
- string build() {
- cout << "Product builded" << endl;
- }
- };
- class Node : Mechanism {
- public:
- string getType() {
- return "Node";
- }
- };
- int main()
- {
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement