Description
The most frequently used buttons in a browser are the forward and backward buttons to traverse the URLs visited by the user.
Based on the doubly linked lists data structure, write a C++ program to maintain the browsing history in the following ways.
Design a class BrowsingHistory to maintain the browsing history of a user. Each node should store the URL (string) of a web page. The links of a node represent the previous and next page visited by the user.
Write a Current Page function to return the URL of the current web page under browsing.
Also provide a New Page function to add a new URL into the history.
Write a Forward and a Backward function to traverse the browsing history and return the URL of the new current page.
Provide a Display function to print out the entire browsing history. Test your functions properly in the main program.