-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibraryItem.h
More file actions
54 lines (38 loc) · 1.27 KB
/
LibraryItem.h
File metadata and controls
54 lines (38 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
/*
File:
LibraryItem.h
*/
#ifndef LIBRARYITEM_H
#define LIBRARYITEM_H
#include <string>
#include <iostream>
using namespace std;
class LibraryItem
{
protected:
int libraryID;
double cost;
string status;
int loanPeriod;
public:
LibraryItem(); //Default Constructor
LibraryItem(int libraryID, double cost, string status, int loanPeriod); //Parametrized Constructor
//Virtual Destructor
virtual ~LibraryItem() {}
//Getter and Setter Methods
virtual int getLibraryID() const;
double getCost() const;
string getStatus() const;
int getLoanPeriod() const;
void setLibraryID(int libraryID);
void setCost(double cost);
void setStatus(string status);
void setLoanPeriod(int loanPeriod);
//Virtual Methods for Overriding
virtual void addItem() = 0; //This shows the method generic for all add items
virtual void editItem() = 0; //This shows the method generic for all edit items
virtual void deleteItem() = 0; //This shows the method generic for all delete items
virtual void searchItem() const = 0; //This shows the method generic for all search items
virtual void printItemDetails() const = 0; //This shows the method generic for all printItemDetails or view items
};
#endif