Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Bank simulation java

21/12/2020 Client: saad24vbs Deadline: 3 days

banking/Account.java

banking/Account.java

package banking ;


import java . time . * ;

import java . util . * ;

import java . util . stream . Collectors ;


/**

 *

 * @author wpollock

 */

public abstract class Account implements Comparable < Account > {

     private static int nextId = 1 ;


     protected final Customer customer ;

     protected final String accountId ;

     protected String description ;

     protected final LocalDateTime creationDate ;

     // protected StatementCycle statementCycle; // An enum representing any

     // // possible statement cycle

     protected double balance ;

     protected List < Transaction > transactions = new ArrayList <> ();


     /**

     * @param cust Customer owning this account

     * @param initialBalance Current balance

     * @param accountDescription A description

     */

     public Account ( Customer cust , double initialBalance ,

             String accountDescription ) {

         this . customer = cust ;

         this . creationDate = LocalDateTime . now ();

         this . accountId = "" ;

         // Stub

     }


     /**

     * @param amount The amount to deposit

     */

     public abstract void deposit ( double amount );


     /**

     * If the account doesn't have sufficient funds for the specified

     * amount, an insufficient funds fee (penalty) is charged on the

     * account.

     * @param amount The amount to withdraw

     */

     public abstract void withdraw ( double amount );


     /** Transfer funds between two accounts of a single customer.

     *

     * @param fromAccount The source of the funds

     * @param toAccount The account in which the funds will be deposited

     * @param amount The amount to transfer

     */

     public static void transfer ( Account fromAccount , Account toAccount ,

             double amount ) {

         // Stub

     }


     /**

     * @return The description for this account

     */

     public String getAccountDescription () {

         return null ; // Stub

     }


     /**

     * @param accountDescription The replacement description of this account

     */

     public void setAccountDescription ( String accountDescription ) {

         // Stub

     }


     /**

     * @return The current account balance

     */

     public double getBalance () {

         return 0.00 ; // Stub

     }


     /**

     * @return read-only view of the account's transaction list

     */

     public List < Transaction > getTransactions () {

         return null ; // Stub

     }


     /**

     * @param transactionId The id of the transaction to search for

     * @return the matching transaction

     * @throws IllegalArgumentException when no such transaction exists

     */

     public Transaction getTransaction ( int transactionId ) {

         return null ; // Stub

     }


     /**

     * @return Account's ID

     */

     public String getAccountId () {

         return null ; // Stub

     }


     /**

     * @return the customer who owns this account

     */

     public String getCustomerId () {

         return null ; // Stub

     }


     /**

     * @return The date and time the account was created.

     */

     public LocalDateTime getAccountCreationDate () {

         return null ; // Stub

     }


    @ Override

     public int hashCode () {

         return 0 ; // Stub

     }


    @ Override

     public boolean equals ( Object obj ) {

         return false ; // Stub

     }


    @ Override

     public int compareTo ( Account other ) {

         return 1 ; // Stub

     }


    @ Override

     public String toString () {

         return null ; // Stub

     }

}

banking/Bank.java

banking/Bank.java

package banking ;


import java . util . * ;

import java . util . stream . Collectors ;


/**

 * @author wpollock

 *

 */

public class Bank {

     private final String NAME ;

     private final Map < String , Customer > customers = new HashMap <> ();

     private double insufficientFundsPenalty = 10.00 ; // Default, in dollars


     /** Creates a new Bank object with the given name.

     *

     * @param name Name of the bank

     */

     public Bank ( String name ) {

         this . NAME = "" ; // Stub

     }


     /** Starts up the Bank simulator

     * @param args command line arguments - ignored

     */

     public static void main ( String [] args ) {

         System . out . println ( "Hello from Bank" ); // Stub

     }


     /**

     * @return the insufficientFundsPenalty

     */

     public double getInsufficientFundsPenalty () {

         return insufficientFundsPenalty ;

     }


     /**

     * @param insufficientFundsPenalty the insufficientFundsPenalty to set

     */

     public void setInsufficientFundsPenalty ( double insufficientFundsPenalty ) {

         // Stub

     }


     /**

     * @return the name

     */

     public String getNAME () {

         return NAME ;

     }


     /** Adds a new bank account

     *

     */

     public void addAccountWizard () {

         // Stub

     }


     /** Generates a report of all current accounts, in account ID order

     * @return A list of all accounts of all customers of this bank, sorted

     * by ID.

     *

     */

     public SortedSet < Account > getAllAccounts () {

         // for each customer, get accounts and add to sorted set.

         return null ; //Stub

     }


     /** Add a new customer to the bank, using a GUI form

     *

     */

     public void addCustomerWizard () {

     }


     /** Add a new customer to the bank.

     * @param lastName Customer's last (sur- or family) name

     * @param firstName Customer's first (or given) name

     * @return the customer's ID

     */

     public String addCustomer ( String lastName , String firstName ) {

         return null ; // Stub

     }


     /** Deletes a customer from the bank.

     * (In reality, just marks the customer as non-current.)

     * @param customerId the ID of the customer to remove

     */

     public void removeCustomer ( String customerId ) {

         // Stub

     }


     /** Generates a report of all current customers, in customer ID order

     * @return SortedSet of all customers at this bank.

     */

     public SortedSet < Customer > getAllCustomers () {

         return null ; // Stub

     }


     /** Get a Customer object, given a customer's ID

     *

     * @param customerId The ID of the customer

     * @return That customer's Account, or null

     */

     public Customer getCustomer ( String customerId ) {

         return null ; // Stub

     }


     /** Get a List of Customer objects, given a customer's last and

     * first names

     *

     * @param lastName The customer's last name

     * @param firstName The customer's first name

     * @return a List of Customers with that first and last name,

     * or null if no such customer exists

     */

     public List < Customer > getCustomer ( String lastName , String firstName ) {

         return null ; // Stub

     }


     /** Return a List of a given customer's accounts (if any)

     *

     * @param customerId The Customer ID who's account list is desired.

     * @return a List of the accounts of that customer, if any.

     */

     public List < Account > getCustomersAccounts ( String customerId ) {

         return null ; // Stub

     }

}

banking/Customer.java

banking/Customer.java

package banking ;


import java . util . * ;


/**

 * @author wpollock

 *

 */

public class Customer implements Comparable < Customer > {

     private static int nextId = 1 ;


     private final Bank bank ;

     private final String customerId ;

     private final String lastName ;

     private final String firstName ;

     private final SortedSet < Account > customerAccounts = new TreeSet <> ();


     /** Creates a new Customer object from a name.

     * Note for this project, we assume bank names are unique.

     * @param bank The bank owning this account

     * @param lastName The last name of the account owner.

     * @param firstName The first name of the account owner.

     */

     public Customer ( Bank bank , String lastName , String firstName ) {

         this . bank = null ;

         this . customerId = "" ;

         this . lastName = "" ;

         this . firstName = "" ;

         // Stub

     }


     /**

     * @return the bank

     */

     public Bank getBank () {

         return null ; // Stub

     }


     /** Getter for customer's ID

     * @return The customer's ID

     */

     public String getCustomerId () {

         return null ; // Stub

     }


     /** Getter for the customer's last name

     * @return The customer's last name

     */

     public String getLastName () {

         return null ; // Stub

     }


     /** Getter for the customer's first name

     * @return The customer's first name

     */


     public String getFirstName () {

         return null ; // Stub

     }


     /** Returns a read-only SortedSet of the customer's active

     * accounts (if any)

     *

     * @return an immutable SortedSet of accounts (check for

     * immutability of accounts; use a List?)

     */

     public SortedSet < Account > getCustomerAccounts () {

         return null ; // Stub

     }


     /** Returns the total fees (including penalties) paid by this customer

     * for year-to-date

     *

     * @return YTD fees paid

     */

     public double ytdFees () {

         return 0.0 ; // Stub

     }


     /** Returns the total interest paid to this customer for year-to-date

     * @return YTD interest payed

     */

     public double ytdInterest () {

         return 0.0 ; // Stub

     }


     /** Adds a new bank account

     * @param initBal Initial balance

     * @param desc A description for the account, chosen by the customer

     * @return the newly added account object

     */

     public SavingsAccount addSavingsAccount ( double initBal , String desc ) {

         return null ; // Stub

     }


     /** Deletes a given account (in the real world, just marks it as defunct

     * or something)

     * @param accountId the ID of the account to remove

     */

     public void removeAccount ( String accountId ) {

         // Stub

     }


     /** Find an account given an account ID

     *

     * @param accountId The ID of the desired account

     * @return The Account object, or null if no such account

     */

     public Account getAccount ( String accountId ) {

         return null ; // Stub

     }


    @ Override

     public String toString () {

         return "" ; // Stub

     }


    @ Override

     public int hashCode () {

         return 0 ; // Stub

     }


    @ Override

     public boolean equals ( Object obj ) {

         return false ; // Stub

     }


    @ Override

     public int compareTo ( Customer other ) {

         return 1 ; // Stub

     }

}

banking/SavingsAccount.java

banking/SavingsAccount.java

package banking ;


import static banking . TransactionType . * ;


/**

 * @author wpollock

 *

 */

public class SavingsAccount extends Account {

     // Default monthly interest rate, applied on last day of statement cycle:

     private static double DEFAULT_INTEREST_RATE = 2.0 ; // a percent


     /** SavingsAccount constructor, using default interest rate.

     * @param cust The customer that owns this account

     * @param initialBalance The initial account balance

     * @param description An account description provided by the owner

     */

     public SavingsAccount ( Customer cust , double initialBalance ,

             String description ) {

         super ( cust , initialBalance , description );

     }


     /** SavingsAccount constructor, using a custom interest rate.

     * @param cust The customer that owns this account

     * @param initialBalance The initial account balance

     * @param description An account description provided by the owner

     * @param interestRate Account's default monthly interest rate

     */

     public SavingsAccount ( Customer cust , double initialBalance ,

             String description , double interestRate ) {

         super ( cust , initialBalance , description );

         // Stub

     }


    @ Override

     public void deposit ( double amount ) {

         // Stub

     }


    @ Override

     public void withdraw ( double amount ) {

         // Stub

     }


     /** Adds a transaction "INTEREST PAYMENT" based on this account's

     * monthly interest rate.

     * @param rate Interest rate to apply, as a percentage (e.g. 2.1".

     */

     public void addInterestTransaction ( double rate ) {

         // Stub

     }


     /**

     * @return the interestRate

     */

     public static double getDefaultInterestRate () {

         return 0.00 ; // Stub

     }


     /**

     * @param interestRate the interestRate to set

     */

     public static void setDefaultInterestRate ( double interestRate ) {

         // Stub

     }

}

banking/Transaction.java

banking/Transaction.java

package banking ;


import java . time . * ;


/**

 * @author wpollock

 *

 */

public class Transaction implements Comparable < Transaction > {

     private static int nextID = 1 ;


     private final int id ;

     private final LocalDateTime timestamp ;

     private final TransactionType type ;

     private final double amount ;

     private final String description ;

     /**

     * @param type The type of this transaction

     * @param amount The amount of the transaction

     * @param description The description of the transaction.

     * This may include check numbers, memo, payee, etc.

     */

     public Transaction ( TransactionType type , double amount ,

             String description ) {

         this . id = 1 ;

         this . type = null ;

         this . amount = 0.00 ;

         this . description = "" ;

         this . timestamp = LocalDateTime . now ();

         // Stub

     }


     /**

     * @return the id

     */

     public int getId () {

         return 0 ; // Stub

     }


     /**

     * @return the timestamp for this transaction

     */

     public LocalDateTime getTimestamp () {

         return null ; // Stub

     }


     /**

     * @return the transaction type

     */

     public TransactionType getType () {

         return null ; // Stub

     }


     /**

     * @return the amount of this transaction.

     * Transaction amounts are always positive.

     */

     public double getAmount () {

         return 0.00 ; // Stub

     }


     /**

     * @return the description

     */

     public String getDescription () {

         return null ; // Stub

     }


    @ Override

     public String toString () {

         return "" ; // Stub

     }


    @ Override

     public int hashCode () {

         return 1 ; // Stub

     }


    @ Override

     public boolean equals ( Object obj ) {

         return false ; // Stub

     }


    @ Override

     public int compareTo ( Transaction other ) {

         return 0 ; // Stub

     }


}

banking/TransactionType.java

banking/TransactionType.java

package banking ;


/** A list of the possible types of transactions in the banking simulation.

 * @author wpollock

 *

 */

public enum TransactionType {

    DEPOSIT , WITHDRAWAL , INTEREST , CHECK , FEE , PENALTY , ADJUSTMENT ;

}

Applied Sciences

Architecture and Design

Biology

Business & Finance

Chemistry

Computer Science

Geography

Geology

Education

Engineering

English

Environmental science

Spanish

Government

History

Human Resource Management

Information Systems

Law

Literature

Mathematics

Nursing

Physics

Political Science

Psychology

Reading

Science

Social Science

Home

Blog

Archive

Contact

google+twitterfacebook

Copyright © 2019 HomeworkMarket.com

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Top Essay Tutor
Homework Guru
University Coursework Help
Helping Hand
Writer Writer Name Offer Chat
Top Essay Tutor

ONLINE

Top Essay Tutor

I have more than 12 years of experience in managing online classes, exams, and quizzes on different websites like; Connect, McGraw-Hill, and Blackboard. I always provide a guarantee to my clients for their grades.

$235 Chat With Writer
Homework Guru

ONLINE

Homework Guru

Hi dear, I am ready to do your homework in a reasonable price and in a timely manner.

$232 Chat With Writer
University Coursework Help

ONLINE

University Coursework Help

Hi dear, I am ready to do your homework in a reasonable price.

$232 Chat With Writer
Helping Hand

ONLINE

Helping Hand

I am an Academic writer with 10 years of experience. As an Academic writer, my aim is to generate unique content without Plagiarism as per the client’s requirements.

$230 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Beyond good and evil slaughterhouse east wing - Carnegie mellon capability maturity model - Code orange book theme - Dc shunt motor circuit diagram - Collaboration Process to Improve Team Communication - Cambria name meaning biblical - What are your personal ethics - Labor relations presentation hrm 531 - Cover Letter - Horizontal expansion of job - Best gopro case 2017 - Business and functional level strategies - History Homework - English-Discussion - Nursing - The jilting of granny weatherall literary analysis answers - Nptc national safety conference - Assign-2 - Assignment - Oompa loompa purple hair - Google analytics merchandise store demo account - First step in na - Feso4 pb no3 2 - Is sid the science kid biracial - Principal teachings of peace in christianity - Gilgamesh 3-5 page paper outline attached and sample - Waeco rvs 550 reversing camera - Zara marketing strategy pdf - Beckwith: Paragraphs 8-10 -lzh - Reading response - Creating Company E-mail/WIFI/Internet Use Policies (Cyber Security) - What is affirmation in motivational interviewing - Uts business school guide to writing assignments - Costco Case Study - And death shall have no dominion summary - God of schemes sacrifice - Alligator river story activity - Acid base titration analysis of vinegar experiment - Should writers use they own english - Http www wisc online com objects viewobject aspx id sce304 - Tien wah press holdings berhad annual report - Phi 208 week 1 quiz answers - Occupy mall street case - In which of the following cases has communication occurred? - What literature is now contained in the fasb asc - JDP - Heat of reaction hess's law - Total sum of square formula - Pcc event management - Assignment - Wadsworth college reading series book 2 answers - Unit 8 Discussion - Angular tolerance stack up - Restrict the domain of the quadratic function - Engl 102 test 2 answers - External and Internal Environments Instructions - Analog to digital and digital to analog conversion techniques - Medisys corp case study ppt - Functional health assessment nursing - Bug off exterminators accounting problem - The birthmark sparknotes - VERY HURY!!! IF U CAN DO IT IN 10HS!!!!!!! - Salvete in mundo domi vostrae estis traduction - Cardiology doncaster royal infirmary - Mass effect 3 support admiral raan or gerrel - Order 2534029: Math ( 16 math questions ) - Nursing diagnosis for gestational diabetes mellitus care plan - Life magazine 1956 ideal modern woman - Kepnock state high school - Supply chain management walmart case study - Evidence-based Practice - Case Study Project - What is safe harbor nursing texas - Connect.mheducation.com/connect/login/validate.htm - Nasm heart rate zones - Old oregon wood store case study - Anthem of the doomed youth - All risk is not equal in financial management - Therapeutic Communication - Methods of real analysis goldberg solutions manual - Psychological question - Blue light cystoscopy with cysview - Assignment help - Functional area information systems - Business Intelligence - U cup seal catalog - Ohm's law and its applications pdf - Emily purchased a building to store inventory - Recycling at work handy hints to employers reading answers - Thermo king alarm codes - Volume of a rhombus prism calculator - Dementas v estate of tallas - Tuning Data Warehouse - DATABASE - Organizational behaviour - Sperm or ovum crossword - Icd 10 code lumbar facet arthropathy - Best cost provider strategy advantages - Canvas chaffey - Marketing mix of louis vuitton