Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Problem 2 In this problem, you will implement back and forward button, and history functionality for a web browser tab. The browser tab allows a

image text in transcribed

Problem 2 In this problem, you will implement back and forward button, and history functionality for a web browser tab. The browser tab allows a user to visit websites sequentially. After each visit, the user may perform a back or forward operation until such an operation is possible. The back button takes the user back to the previous visited website, and forward button invalidates the back operation and takes the user to the page they visited before selecting the back operation. E.., the user has already visited the following websites i. www.google.com ii. www.google.com/search?source-hp&q-hello i www.google.com/search?source-hp&q-spartans v. www.google.com/search?source-hp&q-sjsu At this point, the current page is "www.google.com/search?source-hp&q sjsu". Now, a back operation takes the user back to "www.google.com/search?source=hp&q=spartans". Another back operation takes the user back to "www.google.com/search?source-hp&q-hello". Now, a forward operation takes the user to "www.google.com/search?source- hp&q spartans. Another forward operation takes the user back to "www.google.com/search?source hp&q sjsu". At this point, no more forward operations are possible You are provided two files BrowserTab.h and main.cpp. BrowserTab.h consists of the declaration of the browser class. main.cpp consists of test cases and expected behavior of the program. An important operation you will need to support is the ability to print all the operations performed (the history of all pages visited, backs and forwards). You may choose to store this information in an array or a linked list. You may not use any STL data structures or other libraries to store the history You will need to create a file called BrowserTab.cpp, in which you will implement the functions declared in BrowserTab.h that supports the operations provided in main.cpp. Implement back and forward operations using stacks. You may use the STL stack, or your own implementation of stacks For bonus points, implement a Browser class consisting of a list of browser tabs by implementing the functions defined in Browser.h that is provided to you. You may choose to change the data structure used to store the browser tabs. Uncomment the last try catch block in main.cpp to test your code In a file called Browser.pdf, include your ideas on the algorithm and implementation. Also include all your sources in this file Problem 2 In this problem, you will implement back and forward button, and history functionality for a web browser tab. The browser tab allows a user to visit websites sequentially. After each visit, the user may perform a back or forward operation until such an operation is possible. The back button takes the user back to the previous visited website, and forward button invalidates the back operation and takes the user to the page they visited before selecting the back operation. E.., the user has already visited the following websites i. www.google.com ii. www.google.com/search?source-hp&q-hello i www.google.com/search?source-hp&q-spartans v. www.google.com/search?source-hp&q-sjsu At this point, the current page is "www.google.com/search?source-hp&q sjsu". Now, a back operation takes the user back to "www.google.com/search?source=hp&q=spartans". Another back operation takes the user back to "www.google.com/search?source-hp&q-hello". Now, a forward operation takes the user to "www.google.com/search?source- hp&q spartans. Another forward operation takes the user back to "www.google.com/search?source hp&q sjsu". At this point, no more forward operations are possible You are provided two files BrowserTab.h and main.cpp. BrowserTab.h consists of the declaration of the browser class. main.cpp consists of test cases and expected behavior of the program. An important operation you will need to support is the ability to print all the operations performed (the history of all pages visited, backs and forwards). You may choose to store this information in an array or a linked list. You may not use any STL data structures or other libraries to store the history You will need to create a file called BrowserTab.cpp, in which you will implement the functions declared in BrowserTab.h that supports the operations provided in main.cpp. Implement back and forward operations using stacks. You may use the STL stack, or your own implementation of stacks For bonus points, implement a Browser class consisting of a list of browser tabs by implementing the functions defined in Browser.h that is provided to you. You may choose to change the data structure used to store the browser tabs. Uncomment the last try catch block in main.cpp to test your code In a file called Browser.pdf, include your ideas on the algorithm and implementation. Also include all your sources in this file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students explore these related Databases questions