When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
6 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
#ifndef LIBRARYRECORD_HPP
#define LIBRARYRECORD_HPP
#include <vector>
#include "ArrayBag.hpp"
#include "Book.hpp"
class LibraryRecord : public ArrayBag<Book> {
private:
std::vector<Book> checkedOutBooks_;
public:
bool checkIn(const Book& book);
bool checkOut(const Book& book);
int getCheckOutHistory(const Book& book) const;
void display() const;
void displayTitles() const;
bool duplicateStock();
bool removeStock(const Book& book);
bool equivalentRecords(const LibraryRecord& other) const;
void operator+=(const LibraryRecord& other);
void operator/=(const LibraryRecord& other);
};
#endif
!f
#include <iostream>
#include "LibraryRecord.hpp"
bool LibraryRecord::checkIn(const Book& book) {
return add(book);
}
bool LibraryRecord::checkOut(const Book& book) {
if (remove(book)) {
checkedOutBooks_.push_back(book);
return true;
}
return false;
}
!solved
Thank you and let us know if you have any more questions!