-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBook.h
38 lines (35 loc) · 803 Bytes
/
Book.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
#pragma once
#include "String.h"
#include "Vector.h"
class Book
{
public:
Book();
void setTitle(const String&);
void setAuthor(const String&);
void setGenre(const String&);
void setSummary(const String&);
void setYear(const size_t);
void setTags(const Vector<String>&);
void setRating(const double);
void setId(const size_t);
void printBriefly() const;
void printDetailed() const;
void loadBook(std::istream&);
void saveBook(std::ostream&) const;
const size_t getID() const;
const String& getTitle() const;
const String& getAuthor() const;
const Vector<String>& getTags() const;
const size_t getYear() const;
const double getRating() const;
private:
String title;
String author;
String genre;
String summary;
Vector<String> tags;
size_t year;
double rating;
size_t id;
};