CS 127 Assignments

Assignment 3: Minibrowse History

We're going to begin work on Minibrowse, the next generation web browser and search engine. For this assignment, you will start with the core Minibrowse code and add functionality to display a history window that displays the previous 5 web sites that the user has visited. You will do this by implementing a custom DoubleLinkedList class subject to specifications.

Part 1: Minibrowse

Copy Minibrowse.java to your own directory, compile it, and run it. Type in a URL at the top, and hit Enter to get the web page to render. Enjoy the poor rendering that you see, and appreciate the power of "real" web browsers. Nonetheless, this is a great platform on which we can build. Look carefully at the code to get an understanding of how it works. Try deleting lines or modifying them, and see how it affects your program.

Part 2: OutputWindow

Copy OutputWindow.java to your own directory, compile it, and run it. Look carefully at the code to get an understanding of how it works, keeping in mind that you will eventually use code like this for displaying a user's history. Try deleting lines or modifying them, and see how it affects your program. You will need to use the key combination ctrl-c to quit your program in the terminal window, since I did not set the default close operation to be "exit on close." This is the way your history window should be; you don't want your entire Minibrowse program to shut down when you close the history window.

Part 3: DoubleLinkedList

Create a class called DoubleLinkedList<E> that uses generic types. Use whatever methods you think are appropriate. Your linked list should be doubly linked, i.e. each node in the list should link to the node that follows it and the node that precedes it. You must construct your linked list code "from scratch." You should not use classes from the Java Collections Framework such as LinkedList or other similar classes you may find. This is so that you can gain the valuable experience of constructing a linked list yourself. Once this assignment is complete and turned in, you will be free to use the standard LinkedList class on future homework assignments.

Part 4: Putting it all together

Have fun!