Question: Struggling with a code. Need help with the browser history stuff. Here is what I have so far. //Webpage.h #pragma once #include using namespace std;

Struggling with a code. Need help with the browser history stuff. Here is what I have so far.

//Webpage.h

#pragma once
#include
using namespace std;
class Webpage
{
public:
Webpage();
Webpage(const string& webpageUrl, const time_t& timeVisited);
string getURL();
time_t getTime();
private:
// Add private member variables for your class along with any
// other variables required to implement the public member functions
// TO BE COMPLETED
string URL;
time_t timer;
};
#include "Webpage.h"
Webpage::Webpage()
{
URL = "";
timer = time(NULL);
}
Webpage::Webpage(const string& webpageUrl, const time_t& timeVisited)
{
URL = webpageUrl;
timer = timeVisited;
}
string Webpage::getURL()
{
return(URL);
}
time_t Webpage::getTime()
{
return timer;

}

#pragma once
#include
#include
#include
#include
#include
#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:
// Add private member variables for your class along with any
// other variables required to implement the public member functions
// TO BE COMPLETED

};

#include "BrowserHistory.h"
BrowserHistory::BrowserHistory() {
// TO BE COMPLETED
}
BrowserHistory::~BrowserHistory() {
// TO BE COMPLETED
}
void BrowserHistory::visitSite(Webpage newSite) {
// TO BE COMPLETED
}
string BrowserHistory::getURL() {
// TO BE COMPLETED
}
size_t BrowserHistory::getNavSize() {
// TO BE COMPLETED
}
string BrowserHistory::back() {
// TO BE COMPLETED
}
string BrowserHistory::forward() {
// TO BE COMPLETED
}
void BrowserHistory::readHistory(string fileName) {
// TO BE COMPLETED
}
void BrowserHistory::printBackSites() {
// TO BE COMPLETED
}
void BrowserHistory::printForwardSites() {
// TO BE COMPLETED
}
void BrowserHistory::printFullHistory() {
// TO BE COMPLETED
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!