Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using Java Look at the following requirement statement: The bank online offers t

ID: 3851689 • Letter: U

Question

Using Java


Look at the following requirement statement: The bank online offers the following types of accounts: saving accounts, checking accounts and money market accounts. Each account hold name, account number, balance and interest rate. Write the application for this bank to allow users to deposit money into an account (increasing its balance), withdraw money from an account (decreasing its balance) and get the monthly statement To make decision how many data type classes are needed for this project do 3 following steps: a. Step1: listing all the nouns in above problem domain Step2: Refine the above list to include only the necessary noun on the list to be the name of class by removing any noun from the above list that modifies other noun, has the same meaning or does not b. For example: between account and customer: it is better if just keep account as a class because the attributes of customers, such as, name, id, address, etc can be name, id address of an account. c. Steps: Identify the responsibilities of the class or classes (tist fields that s needed to define and ist alt to define and list all the actions that the class is responsible for doing) ART 2

Explanation / Answer

The answer is as follows:

Th code is as follows:

#import java.io.*;

public class BankAccount {
    
    private      String name;
    private      int acct_no;
    private      double balance;
    private      float rate_of_intrest;
    private      String typeOfAccount;   // can be savings account, checking account, or money market account
   

    public void setName(String a){
           name = a;
    }
    public void setAcctNo(int a){
           acct_no = a;
    }
    public void setTypeOfAccount(String type){
           typeOfAccount = type;
    }
    public void setRateOfIntrest(float rate){
           rate_of_intrest = rate;
    }
    public String getName(){
           return name;
    }
    public int getAcctNo(int a){
           return acct_no = a;
    }
    public String getTypeOfAccount(){
           String typeOfAccount = type;
    }
    public float getRateOfIntrest(){
           return rate_of_intrest;
    }
    public void deposit(double amt){  
            balance = balance + amt;
            cout << "Current Balance" << balance;
    }

    public void withdrawl(double amt){
            if (amt > balance)
               cout << "Transaction Failed: Insiufficient funds" << endl;
            else
               balance = balance - amt;
            cout << "Current Balance" << balance;
    }

    public void getMonthlyStatement(){
     // This function is not clearly stated as to what it has to implement.
    }

   
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote