Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. class Product {
  7. private:
  8.     string name;
  9.     double price;
  10.     string unit;
  11.     double amount;
  12.    
  13.     double bought;
  14. public:
  15.     Product();
  16.     Product(string Name, double Price, string Unit, double Amount);
  17.    
  18.     void setName(string name);
  19.     void setPrice(double price);
  20.     void setUnit(string unit);
  21.     void setAmount(double amount);
  22.    
  23.     string getName() const;
  24.     string getUnit() const;
  25.     double getPrice() const;
  26.     double getAmount() const;
  27.    
  28.     double getBought();
  29.    
  30.     void buy(double amount_buy);
  31.     double getProfit();
  32. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement