Question: Array Lists JAVA (fill in the blanks code to create desired output) The first part of this recitation will be building a simple BrowserHistory class

Array Lists JAVA (fill in the blanks code to create desired output)

Array Lists JAVA (fill in the blanks code to create desired output)

The first part of this recitation will be building a simple BrowserHistory

class to handle the forward and back buttons (for use methods) of

The first part of this recitation will be building a simple BrowserHistory class to handle the forward and back buttons (for use methods) of a simple web browser. Here is some starter code. Your job 13 to implement the code marked to be implemented class WebPaget String url; String content; WebPage (String url, string content) t this.ur1 = url ; this.content -content public void display) System.out.println("URL:url); System.out.println( "Content: " content + " "); /* Doubly Linked list Node/ class Historystate t This activity is licensed under CC BY-SA 4.0 license. 1/4 CSCI-UA 102, In-class Group Activity WebPage page; Historystate prev; Historystate next // Constructor to create a new state // next and prev is by default initialized as null Historystate (WebPage p) t page p; class BrowserHistory t Historystate current; WebPage errorPage BrowserHistory() f current-null; errorPage new WebPage(null, "404 not found"); / Implement needed methods here // 1. navigate /I 2. back 3. forward Here is the main class that will be used to test your code public class recitation3 t public static void main(Stringl] args) BrowserHistory history -new BrowserHistory: history.back().display); history.navigate("www.nyu.edu", "we love purple").display); history.navigate("www.google.com, search for stuff") display O history.navigate("www.yahoo.com", "did you get lost looking for google?").display() history.navigate("www.amazon.com* "buy stuff").display() history.forward().display ); history.back().display); history.back).display); history.navigate("www.facebook.com", "search for friends").display) history.forward().display ); history.back().display); history.back).display ); history.back).display); history.forward().display); This activity is licensed under CC BY.SA 40 license 2/4 CSCI-UA 102, In-class Group Activity history.forward).display); Your code must match this output: No valid current page! URL: null Content: 484 not found URL: www.nyu.edu Content: We love purple URL: www.google.com Content: search for stuff URL: www.yahoo.com Content: did you get lost looking for google? URL:Www.amazon.com content : html>buy stuff

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!