COMP 110-001 - Introduction to Programming (Spring 2009)

Lab 6

25 points

Assigned: March 20th

Due: March 26th by midnight

Description

This lab is based on Ch. 6 Ex. 1 & 2 of your text, Savitch & Carrano, "Java: An Introduction to Problem Solving and Programming", 5th edition.

Part 1

Create a class called "Time" that represents the time of day. It has attributes for the hour and minute. Valid hour values range from 0-23 and valid minute values range from 0-59.

Part 2

Create a class called "TaxUtils" that will bundle together several static methods for tax computations. This class should NOT have a constructor. Its attributes are

Its methods are

HINT: See the beginning of section 6.3 in the text for a strategy that can be used to round to the nearest penny.

Part 3

Create a class called "TaxUtilsTester" that will perform some basic tests on your "TaxUtils" class. At the very LEAST, your TaxUtilsTester must do the following

Submission

Before submitting, make sure that each .java file contains a properly edited Program Header.

For this assignment you will need to create a Jar file that contains the source code for Time.java, TaxUtils.java AND TaxUtilsTester.java that you edited as part of this assignment. Follow these instructions for creating a Jar file.
The Jar file you submit must be named yourlastname_lab6.jar, where yourlastname is your last name

Submit yourlastname_lab6.jar via the UNC Blackboard System under "Assignments → Lab 6" before the deadline.

Grading