-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibrary.h
More file actions
34 lines (24 loc) · 760 Bytes
/
Library.h
File metadata and controls
34 lines (24 loc) · 760 Bytes
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
#ifndef _LIBRARY_H
#define _LIBRARY_H 1
#include <string>
using namespace std;
//DO NOT CHANGE THIS FILE
class Library{
public:
//constructor
//creates a library with no books
Library();
//Adds the given book to the library and returns zero
//returns false if the book already exists or if the library
// already has 10 books
bool addBook(string bookName);
//Removes the given book name from the library by setting the
// corresponding string to "", and returns true
//returns false if the library does not have the given book
bool removeBook(string bookName);
//prints the book names
void print();
private:
string books[10]; //book names. (by default, all are initialized with "")
};
#endif