Creating a browser class which takes a url , maintain a back and forward navigation.
Well, Its not a actual browser, if thats what you are thinking. Does not involve in any real browser functionality, its a simplest Browser class which mimics certain behavior of a browser as follows.
Here is what is expected out of this
-
It takes a String ( url ) in a function ( choose your name), and displays "Welcome to << domain name >> ( excludes the www or the com|in... part): For example for given String "http://www.google.com" , it displays "Welcome to Google"
-
It also has a function which tells you whether there is anything left in the back navigation list.
-
Has a function which tells you whether there is anything left in the forward navigation list.
-
And surprisingly enough,:) it also lets you go forward or go backward, and upon doing so , it browses the respective navigation based on the list.
Create a console based application with a class named Browser ( I am not giving away the other functional details; method names etc).