Define a new class bankdatabase

Assignment Help JAVA Programming
Reference no: EM131602569

Build a back up of project we made before.

For this project, we need to define a new class BankDatabase. The BankDatabase contains the bank account information for all accounts including saving accounts and checking accounts. The customer names are passed as "firstname lastname". Your application must split the string into two separate strings for first name and last name (Hint: use the split() method). If you decide to use an array to store the bank accounts, you can assume there will be maximum of 100 bank accounts in the Bank Database. Alternatively, you can consider using an ArrayList in which case its size can grow automatically as new bank accounts are added. BankDatabase class implements the following methods:

BankDatabase() - constructor
void creatCheckingAccount(String customerName, String ssn, float deposit) - This method creates a checking account
void creatSavingAccount(String customerName, String ssn, float deposit) - This method creates a saving account
void print() -This method prints the bank account information in the database in ascending order of the account balances.
void applyIntrest - This methods applies interest to all bank accounts. The interest for each type of account is the same as project 5.
Make the following updates to the BankAccount super class:
1) Make the BankAccount super class an abstract class and make applyInterest an abstract method.
2) The BankAccount super class shall implement the Comparable Interface. You shall implement the compareTo method to provide the means to sort the bank accounts in the ascending order of the account balance.
Identify the objects for this application and define each class attribute with proper access qualifier. You can use the "main" method shown below to test your application. The expected output is also provided.
public class BankApp {
public static void main(String[] args) {
BankDatabase acctDatabase = new BankDatabase();
acctDatabase.createCheckingAccount("Alin Parker", "123-45-6789", 20000.0f);
acctDatabase.createSavingAccount("Mary Jones", "987-65-4321", 15000.0f);
acctDatabase.createSavingAccount("John Smith", "123-45-6789", 12000.0f);
acctDatabase.print();
acctDatabase.applyInterest();
acctDatabase.print();
}
======= expected output =============
Succesfully created account for Alin Parker Account Number 5435736518
Succesfully created account for Mary Jones Account Number 3612979581
Succesfully created account for John Smith Account Number 6998050883
John Smith, accn #: 6998050883, Balance $12000.0
Mary Jones, accn #: 3612979581, Balance $15000.0
Alin Parker, accn #: 5435736518, Balance $20000.0
John Smith, accn #: 6998050883, Balance $12600.0
Mary Jones, accn #: 3612979581, Balance $15750.0
Alin Parker, accn #: 5435736518, Balance $20200.0

Attachment:- Bankdata.zip

Reference no: EM131602569

Questions Cloud

Address possible causes of the addiction : Address possible causes of the addiction as well as the prevalence and potential treatments.
Define loulans sexual response model : Define Loulans sexual response model, Why was Masters and Johnson's four phase model so controversial? Johnson argued that sexual problems
When creating daily variance-covariance matrix : When creating a daily variance-covariance matrix ( this is a daily risk assessment), how to scale it up to an annual basis?
What do the given quantities tell about the reservoir : Let f(t) and g(t) give, respectively, the amount of water (in acre-feet) in two different reservoirs on day t. Suppose that f(0) = 2000, g(0) = 1500.
Define a new class bankdatabase : Define a new class BankDatabase. The BankDatabase contains the bank account information for all accounts including saving accounts and checking accounts
Describes the significance of the study : Describes the significance of the study and the implications of the potential results based on the research questions.
Describe how immigration impacts all levels of government : Describe how immigration impacts all levels of government. Contrast the differences and similarities between a direct democracy and a representative democracy.
Evaluate the area of a circle of radius : The result from part (a) should look familiar. What does dA/dr represent geometrically?
A firm may repurchase its own stock in the market because : A firm may repurchase its own stock in the market because

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd