-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPatron.cpp
More file actions
68 lines (55 loc) · 1.27 KB
/
Patron.cpp
File metadata and controls
68 lines (55 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
Lisa Lin (lisalin@my.unt.edu)
Homework 3 Assignment - Library Management System
Started: 3/12/2021
Patron entity cpp file
*/
#include "Patron.h"
#include <iomanip>
#include <string>
#include <iostream>
using namespace std;
Patron::Patron(){
this->name = "";
this->patronID = 0;
this->fine = 0.0;
this->booksChecked = 0;
}
Patron::Patron(string name, int patronID, float fine, int booksChecked) {
this->name = name;
this->patronID = patronID;
this->fine = fine;
this->booksChecked = booksChecked;
}
void Patron::setName(string pName){
this->name = pName;
}
string Patron::getName(){
return name;
}
void Patron::setID(int id){
this->patronID = id;
}
int Patron::getID(){
return patronID;
}
void Patron::setFine(float pFine){
this->fine = pFine;
}
float Patron::getFine(){
return fine;
}
void Patron::setBooksChecked(int numBooks){
this->booksChecked = numBooks;
}
int Patron::getBooksChecked(){
return booksChecked;
}
void Patron::printPatronInfo() {
cout << endl << "----------" << endl;
cout << "Patron Name: " << name << endl;
cout << "Patron ID: " << patronID << endl;
cout << fixed << setprecision(2);
cout << "Fine Amount: " << fine << endl;
cout << "Books Checked: " << booksChecked << endl;
}