RU beehive logo ITEC dept promo banner
ITEC 120
2009spring
ibarland
nokie
jmdymacek

homeinfolectslabsexamshws
textbooktutor/PIsjava.lang docsjava.util docs

lab04a
Writing stub methods

For this lab, you will write a test class, and method stubs, but not correctly-implement the methods. To check off the lab, your test cases should not give the expected result.

You are contributing to an open-source web browser, by making a class Bookmark. A Bookmark maintains information about a URL which a user might (re)visit frequently. In our case, Bookmarks even keep track of how many times the user has visited the bookmarked page.

Write class BookmarkTester, whose main method creates a Bookmark object and calls the following methods (behaviors).

Behaviors (methods) we want (to test), for Bookmarks:

Your test-class can create two different Bookmark objects, and make sure that visiting one Bookmark doesn't cause the other one to thinks it's been visited.

After writing your test-class, write the method stubs for class Bookmark. Your program should compile, and your test cases print the desired and expected answers. Of course, the answers won't be the expected, correct answers since we have only written method stubs.

You may refer to the BankAccountTester and BankAccount classes from lecture. Your solution to this lab should be similar to the above two.

homeinfolectslabsexamshws
textbooktutor/PIsjava.lang docsjava.util docs


©2009, Ian Barland, Radford University
Last modified 2009.Feb.10 (Tue)
Please mail any suggestions
(incl. typos, broken links)
to iba�rlandrad�ford.edu
Powered by PLT Scheme