-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCopy.h
More file actions
48 lines (42 loc) · 1.48 KB
/
Copy pathCopy.h
File metadata and controls
48 lines (42 loc) · 1.48 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
#include <iostream>
#include <fstream>
class Copy
{
private:
//copy.txt file format:
//ISBN ID Title Author Category Reader's_Name Start_Date_of_borrowing_period Expiration_Date
//data attributes for book
int ISBN{};// ISBN of the book (unique to other books)
int ID{};// ID of the book (unique to the other books of the same ISBN)
string title{};// title of the book
string author{};// author of the book
string category{};// category the book is in
string readerName{};// the name of the reader who checked out the book
int checkOut{};// the date the book was checked out at
int expiration{};// the date that the book becomes overdue
public:
//constructors
Copy();
Copy(int ISBN, int ID, string title, string author, string category, string readerName, int checkOut, int expiration);
//overload operators with access to information of the object and file to input and output information
friend istream& operator >> (istream& copyFile, Copy& copyObj);
friend ostream& operator << (ostream& copyFile, Copy& copyObj);
//accessor methods
int getISBN();
int getID();
string getTitle();
string getAuthor();
string getCategory();
string getReaderName();
int getCheckOut();
int getExpiration();
//mutator methods
void setISBN(int inISBN);
void setID(int inID);
void setTitle(string inTitle);
void setAuthor(string inAuthor);
void setCategory(string inCategory);
void setReaderName(string inReaderName);
void setCheckOut(int inCheckOut);
void setExpiration(int inExpiration);
};