Program 1: Writing Your Own Class
Purpose
The purpose of this assignment is to write a custom class that integrates
with an existing test program.
Partners
You may (and are encouraged to) work with at most one other
partner on this assignment. You and your partner must
be in the same lab section. If you work
with a partner, submit one solution with both of your names on it.
Assignment
Create a BlueJ project named Program1 and place
this TestProgram.java file in it.
Your task is to add the missing GringottsAccount.java file
to the project such that when the TestDriver is run, it produces
exactly this output.
Grading (30 points possible)
- 18 points - the GringottsAccount class contains the appropriate
9 methods and these methods are correct (2 points each).
- 2 points - the GringottsAccount class contains the appropriate
4 instance variables.
- 2 points - the GringottsAccount class contains the appropriate
2 class constants.
- 1 point - the GringottsAccount class contains an appropriate
javadoc class comment.
- 2 points - the GringottsAccount class contains appropriate javadoc
comments for each method (including parameters and return types).
- 1 point - the GringottsAccount class contains appropriate
comments for each instance variable and class constant.
- 4 points - when your program is run with TestProgram.java, it
produces exactly the desired format of output.
Helpful Hints
- The Course.java
file covered in lecture on Wednesday, September 17th shows a class
that is appropriately commented.
- The TestProgram.java file above contains comments that should
help you create the GringottsAccount class.
Submission
E-mail the GringottsAccount.java file as an attachment
to your lab TA no
later than the start of your lab on Tuesday, September 30th.
Late submissions receive no credit, but partial credit can
be earned by making an ontime submission.
The subject of the e-mail should be CS 160, Program 1,
your name, your partner's name.