Beruflich Dokumente
Kultur Dokumente
50 points
CS 108
Programming Assignment 5
Objectives
1) Students will design an application that utilizes inheritance and polymorphism.
2) Students will sketch the application class relationships, including all interfaces and abstract
classes.
3) Students will use development best practices.
Background Reading
ZyBooks: 9- Objects and Classes, 10- Inheritance, 11- Abstract Classes and Interfaces
Assignment
Write an application that creates one Bank with three different bank account types: SavingsAccount,
CheckingAccount, and IRAAccount. The Bank class implements the Transaction interface. The accounts
extend the abstract Account class.
Driver output:
Program 5, Patty Kraft, masc0777
Creating accounts...
Customer: Waterford Ellingsworth, Savings account 1 Balance: $4350.00
Customer: Bethanie Treadwell, Checking account 2 Balance: $500.00
Customer: Ira Standish, IRA Savings account 3 Balance: $50000.00, Disbursement Age=59, Early Withdrawal Penalty=0.1
Performing transactions...
Savings account 1 Balance: $4550.00
Checking account 2 Balance: $286.87
IRA Savings account 3 Balance: $50000.00, Disbursement Age=59, Early Withdrawal Penalty=0.1
Updating accounts...
Savings account 1 Balance: $4559.10
Checking account 2 Balance: $286.52
IRA Savings account 3 Balance: $55000.00, Disbursement Age=59, Early Withdrawal Penalty=0.1
Extra Credit
Create a DebitCard account that extends CheckingAccount. Add public methods debit() and credit(); set
transaction fee to 0.35. Be efficient! Reuse code.
Output:
Customer: Debi Cardashian, Debit Card Checking account 4 Balance: $5100.00
Debit Card Checking account 4 Balance: $5100.00
Late Policy
Programs will be accepted up to 1 class period late with a 10% penalty. Grading will be delayed.
Name_______________________________
MascID: masc___________
Proficient
Competent
Novice
Unsatisfactory
Delivery
No requirements
me, or program was
more than one class
period late.
Rubric not attached.
Identification
5
The identification
line is not present.
Documentation &
Readability
9
The documentation is
well written and clearly
explains what the code is
accomplishing and how.
The code is exceptionally
well organized and very
easy to follow and
conforms to best
practices.
The documentation
consists of embedded
comment and some
simple header
documentation that is
somewhat useful in
understanding the
code. The code is fairly
easy to read and
conforms to most best
practices.
The documentation is
simply comments
embedded in the code
with some simple
header comments
separating routines.
The code is readable
only to grader who has
the assignment
description.
The documentation
is simply comments
embedded in the
code and does not
help the reader
understand the
code.
The code is quite
difficult to read and
poorly organized.
Relationship
Diagram
6
Entity(ies)
unaccounted for and/or
incorrect
relationship(s).
Some errors in
implementation or
application output.
Several errors in
implementation and/or
application output.
Correctness and
Test cases
30