用Java链表模拟浏览器

原文链接:http://91daixie.com/cases/6/22/CS1020Take-HomeLab03.html

       程序背景是一个老师,在玩他自己的浏览器的时候,发现了浏览器的标签页和链表的关系,所以出了这道题目。

ugene is a university lecturer who is teaching a basic data structures and algorithms course. At the moment, Eugene is bored. Since he has nothing better to do now, he starts playing around with his internet browser. His browser, along with most browsers available today, has a support for multiple tabs. This means that we can open multiple websites in one single window, in a mini-window that we call ‘tabs’. At any given time, there is at least one tab open. The tabs are arranged in a list. One of them is a ‘current tab’ that the user is currently viewing. Here is an example of tabs:

     1.When a user opens the browser, the page “http://www.comp.nus.edu.sg” is opened by default.

当用户打开浏览器,那么就会打开默认首页。

     2.There are multiple operations that users can do in the browser:

—     用户在浏览器中可以进行多种操作。

     可以打开新标签页。

     可以关闭当前页面。

     切换到下一个页面

     切换到前一个页面。

     打开一个特定的页面。

     打开一个含有特定界面的新标签页。

        2.You are free to define your own linked list class (encouraged for practice and skeleton file given), but you are allowed to use Java’s built-in linked list implementation if it is suitable for this problem.

       事实上,用一个可以自由删除添加访问元素的链表可以对此问题进行建模,从而解决问题。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值