-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBooks.h
98 lines (87 loc) · 1.87 KB
/
Books.h
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#pragma once
#ifndef BOOKS_H
#define BOOKS_H
#include "Bookshop.h"
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <conio.h>
#include <iomanip>
#include <time.h>
#include <string>
#include <Windows.h>
using namespace std;
class Book : public Bookshop
{
protected:
//variables for all books types
string title;
float price;
int id;
string release_date;
string janres;
string language;
string edition;
string writer;
float rating;
public:
//functions set/get for all books types
string get_title();
void set_title();
void set_id(int);
int get_id();
int get_id_no_update();
void set_price();
float get_price();
void set_janres();
string get_janres();
void set_release_date();
void set_language();
void set_edition();
void set_writer();
void set_rating();
float get_rating();
string get_release_date();
string get_language();
string get_edition();
string get_writer();
};
class Paper_book : public Book
//Paper_book is publicly derived class of Book class
{
protected:
string publisher;
int pages;
public:
//this funct shows that this class is not abstract class
virtual void abstract() {};
void set_publisher();
void set_pages();
string get_publisher();
virtual void add_book();
int get_pages();
};
class Audio_cd : public Book
//Audio_cd_book is publicly derived class of Book class
{
protected:
string listening_length;
string voice;
public:
//this funct shows that this class is not abstract class
virtual void abstract() {};
virtual void add_book();
void set_voice();
void set_listening_length();
string get_listening_length();
string get_voice();
};
class Digital_book : public Book
//Digital_book is publicly derived class of Book class
{
public:
virtual void add_book();
virtual void abstract() {};
};
#endif