If you are working in Eclipse, it is recommended that you create a new project to organize your code for this assignment. To do so, select File > New > Java Project and give it a name (e.g., "1030_A1").
Create two classes that will be part of an accounting application. The Transaction
class represents a financial transaction. Implement its API, shown here. The SavingsAccount
class represents a bank account with posted transactions and a balance. Implement its API, shown here.
In addition to code, write Javadoc documentation so that your classes will generate Javadoc that is identical to the provided APIs. To generate the Javadoc html files, open a terminal, navigate to the directory containing your source code, and enter the following command:
javadoc -tag pre.:a:"Precondition: " Transaction.java SavingsAccount.java
Once you have implemented the two classes, you may use the tester class shown here to test your code.
Submit your work using the following command:
submit 1030 Asgn1 Transaction.java SavingsAccount.java
Do not submit A1Test.java
or your Javadoc. The TA will generate your Javadoc from your code.
<pre></pre>
to correctly format the example output in the Javadoc for Transaction.toString()
.
@see Transaction#compareTo(Transaction)
for the SavingsAccount.list()
Javadoc.