Guest User

Untitled

a guest
Apr 18th, 2023
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | Source Code | 0 0
  1. #include "Patron.h"
  2. using namespace std;
  3.  
  4. Patron::Patron()
  5. {
  6.     name = "Undefined";
  7.     iD = -1;
  8.     balance = 0;
  9.     numBooks = -1;
  10.    
  11. }
  12. Patron::Patron(string name, int iD, int balance, int numBooks)
  13. {
  14.     this->name = name;
  15.     this->iD = iD;
  16.     this->balance = balance;
  17.     this->numBooks = numBooks;
  18. }
  19. void Patron::SetName(string myName)
  20. {
  21.     name = myName;
  22. }
  23.  
  24.  
  25. void Patron::SetID(int myID)
  26. {
  27.     iD = myID;
  28. }
  29.  
  30.  
  31. void Patron::SetBalance(int myBalance)
  32. {
  33.     balance = myBalance;
  34. }
  35.  
  36.  
  37.  
  38. void Patron::SetNumBooks(int num)
  39. {
  40.     numBooks = num;
  41. }
  42.  
  43.  
  44.  
  45.  
Advertisement
Add Comment
Please, Sign In to add comment