Lab 4

Statement Counts, Time Complexity, Packages

February 10, 2005

Lab Partners

Everyone should work with one lab partner on this assignment. If you don't know anyone, Mike will help you find a partner. Submit one solution with both of your names on it.

Statement Counts and Time Complexity - 8 points

Print the file Methods.java. This file consists of eight methods. For each method, find its statement count (for example, 13n + 12) and translate the statement count into a Big-Oh time complexity notation (for example, O(n)). Show your work. Each method is worth one point. Hand in the printout that contains the methods, the statement counts and the time complexities to Mike before the lab ends. Make sure that your name(s) is(are) on the paper.

Packages - 2 points

Create a package of your choosing and demonstrate that you can get this package to work from some other project. Demonstrate your working package to either Mike or a lab consultant before the lab is finished. Hint: you will need to follow a similar process to what we did in lecture on Monday, February 7th. You will receive one point for creating a package and a second point for being able to use the package from a different project.

Before Lab Ends

Delete any BlueJ projects that you created and empty the recycle bin. Thanks.