So I\'m stucking implementing the structure for BrowserHistory.cpp and BrowserHi
ID: 3597477 • Letter: S
Question
So I'm stucking implementing the structure for BrowserHistory.cpp and BrowserHistory.h the parts that I dont know how to do are stated with //NEEDED:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#include <string>
#include <stdexcept>
#include "Webpage.h"
using namespace std;
class BrowserHistory {
public:
BrowserHistory();
~BrowserHistory();
void visitSite(Webpage newSite);
string back();
string forward();
void readHistory(string fileName);
string getURL();
size_t getNavSize();
void printBackSites();
void printForwardSites();
void printFullHistory();
private:
// NEEDED
};
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#include "BrowserHistory.h"
BrowserHistory::BrowserHistory() {
// NEEDED
}
BrowserHistory::~BrowserHistory() {
// NEEDED
}
void BrowserHistory::visitSite(Webpage newSite) {
// NEEDED
}
string BrowserHistory::getURL() {
// NEEDED
}
size_t BrowserHistory::getNavSize() {
// NEEDED
}
string BrowserHistory::back() {
// NEEDED
}
string BrowserHistory::forward() {
// NEEDED
}
void BrowserHistory::readHistory(string fileName) {
// NEEDED
}
void BrowserHistory::printBackSites() {
// NEEDED
}
void BrowserHistory::printForwardSites() {
// NEEDED
}
void BrowserHistory::printFullHistory() {
// NEEDED
}
Explanation / Answer
#include <string>
#include <stdexcept>
#include "Webpage.h"
using namespace std;
class BrowserHistory {
public:
BrowserHistory();
~BrowserHistory();
void visitSite(Webpage newSite);
string back();
string forward();
void readHistory(string fileName);
string getURL();
size_t getNavSize();
void printBackSites();
void printForwardSites();
void printFullHistory();
};
#include "BrowserHistory.h"
BrowserHistory::BrowserHistory() {
// NEEDED
}
BrowserHistory::~BrowserHistory() {
// NEEDED
}
void BrowserHistory::visitSite(Webpage newSite) {
// NEEDED
}
string BrowserHistory::getURL() {
// NEEDED
}
size_t BrowserHistory::getNavSize() {
// NEEDED
}
string BrowserHistory::back() {
// NEEDED
}
string BrowserHistory::forward() {
// NEEDED
}
void BrowserHistory::readHistory(string fileName) {
// NEEDED
}
void BrowserHistory::printBackSites() {
// NEEDED
}
void BrowserHistory::printForwardSites() {
// NEEDED
}
void BrowserHistory::printFullHistory() {
// NEEDED
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.