CIS-123 Home: http://www.c-jump.com/bcc/c123c/c123syllabus.htm
In this assignment you write a Java program that demonstrates the concepts covered in class this far.
Write the Java code for the BankAccount class using the following UML diagram:
Write the Java code for a sub class of the BankAccount class and name it SavingsAccount. The specifications for the SavingsAccount class are as follows:
attribute for interest rate
constructor which invokes the constructor for the super class
setter and getter for the interest rate
public method which calls a private method to calculate and return the daily interest, which should be calculated as
dailyInterest = currentBalance * interestRate / 365
Note that * indicates the multiplication operator in Java.
Add another Java class named BankApp that has the main() method to instantiate and test your Java objects:
public static void main( String[] args ) { SavingsAccount newAccount = new SavingsAccount( ... // write your implementation here }
Add overloaded constructors for the BankAccount and the SavingsAccount classes. Recall that overloaded constructors have the same name but different signatures. All constructors should accept input parameters for the customer name and address attributes. One constructor creates an object with a zero current balance, and the other creates an object with the current balance set to whatever value is passed to the constructor as an additional input parameter.
In addition to the two constructors, the getters and setters must be provided for all attributes.
Draw detailed UML class diagram showing BankAccount, SavingsAccount, and the BankApp classes. Remember to use proper UML syntax for all method parameters and method return values. All of the method parameters, return values, and value types must be indicated on the diagram.
If you are using NetBeans project for your Java application, ZIP your src folder before submitting, and then upload all Java source files in a single ZIP archive.
PLEASE DO NOT send any NetBeans projects or compiled .class files. I only need your Java source to grade this assignment.
Also submit the exported graphic file (PNG or JPG) that contains your UML diagram. You may include the diagram in your ZIP file, or upload it separately.
Go to CIS-123 online website and submit your work by clicking on Assignment a7.