Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <string>
- #include <iostream>
- using namespace std;
- class Computer
- {
- protected:
- string firm;
- string mark;
- int yearB;
- public:
- Computer() = default;
- Computer(string firm, string mark, int yearB);
- string print();
- void changeF(string firm);
- void changeM(string mark);
- void changeY(int yearB);
- };
- class Desktop : public Computer
- {
- private:
- int power;
- public:
- Desktop() = default;
- Desktop(string firm, string mark, int yearB, int power);
- void changeP(int power);
- string print(int current_year);
- };
- class Laptop : public Computer
- {
- private:
- int core;
- public:
- Laptop() = default;
- Laptop(string firm, string mark, int yearB, int core);
- void changeC(int core);
- string print(int current_year);
- };
Add Comment
Please, Sign In to add comment