Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- class Product {
- protected:
- string name;
- double price;
- double weight;
- public:
- Product(string, double, double);
- string getName() {return name;}
- double getPrice() {return price;}
- double getWeight() {return weight;}
- };
- class Purchase : public Product {
- private:
- Purchase(string n, double p, double w);
- public:
- };
- class Verification : public Purchase {
- private:
- public:
- };
- int main(){
- system("pause");
- }
- Product::Product(string n, double p, double w)
- {
- name = n;
- price = p;
- weight = w;
- }
Add Comment
Please, Sign In to add comment