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

i need to make this asap c++ it’s a application for a bank account. the instruct

ID: 3738654 • Letter: I

Question

i need to make this asap c++ it’s a application for a bank account. the instructions are stated below.
Bank Account Specifications (Required) This Application stores every transaction as soon as a transaction happens. Only amount of the transaction is stored, the date of transaction or any other data is not stored by this class. When the application starts, it will ask the user about what is the maximum number of expected transactions. You will assume that the balance is zero when the program first starts. The application will allow the user to make deposits as long as the balance is not above $100,000 FDIC limit. The application will allow users to withdraw money as long as the withdrawal amount is no more than the available balance. The application will allow the user to print the available balance at anytime. The application will also allow the banker to print following statistics regarding the account at any time: balance total deposits total withdrawals average deposit amount average withdrawal amount minimum deposit amount minimum withdrawal amount maximum deposit amount maximum withdrawal amount variance of all the deposits variance of all the withdrawal standard deviation of all the deposits standard deviation of all the withdrawal Statistics Class [20 points]
This class will provide functions that are shown in the UML class diagram shown below. Their functionalities are obvious from their names, but ask is you are not sure about any one. The function add() adds a double value at the and of the array. The function get() obtains a copy of the value stored at the location i. The function set() overwrites (changes) the value stored at the location i by the provided value. The printStats() function invokes all other stats related functions and prints them on the screen.
Here are the functions in UML format so you can copy-n-paste add(value: double): void get(i: int): double set(i: int, data: double): void sum(): double average(): double min(): double max(): double var(): double stdev(): double printStats(): void BankAccount Class
This class will have two instances of Statistics class. One will be used to store deposits and other one will be used to store withdrawals.
Here are the functions in UML format so you can copy-n-paste:
deposit(amount: double): void withdrawal(amount: double): void getBalance(): double getTotalDeposits(): double getTotalWithdrawals(): double getAverageDeposit(): double getAveragWithdrawal(): double getMinDeposit(): double getMinWithdrawal(): double getMaxDeposit(): double getMaxWithdrawa(): doublel getVarOfDeposits(): double getVarOfWithdrawal(): double getStdevOfdeposits(): double getStdevOfWithdrawal(): double printAllStats(): void Implementation Notes
For every class, all error conditions (in functions where errors can take place) must be identified and exceptions must be written and thrown. The exceptions must be “caught” only in the test() and process methods. [10 points] For every class that you write, please implement a generic print() function [5 points] that prints all the data “owned” by that class directly or indirectly. Also implement static test() function that tests all other functions without any user input (all values that are otherwise expected from the user will be hard coded), and at least 5 new entries into the array. Exceptions
All Exception classes can be written inside a single file called “myexceptions.h”. The constructors and functions of exception classes can be “inlined” like shown in the class. See lecture on Exceptions. NoDataException
This exception will be thrown by a function in Statistics class that needs the size of the array to be greater than zero. see more i need to make this asap c++ it’s a application for a bank account. the instructions are stated below.
Bank Account Specifications (Required) This Application stores every transaction as soon as a transaction happens. Only amount of the transaction is stored, the date of transaction or any other data is not stored by this class. When the application starts, it will ask the user about what is the maximum number of expected transactions. You will assume that the balance is zero when the program first starts. The application will allow the user to make deposits as long as the balance is not above $100,000 FDIC limit. The application will allow users to withdraw money as long as the withdrawal amount is no more than the available balance. The application will allow the user to print the available balance at anytime. The application will also allow the banker to print following statistics regarding the account at any time: balance total deposits total withdrawals average deposit amount average withdrawal amount minimum deposit amount minimum withdrawal amount maximum deposit amount maximum withdrawal amount variance of all the deposits variance of all the withdrawal standard deviation of all the deposits standard deviation of all the withdrawal Statistics Class [20 points]
This class will provide functions that are shown in the UML class diagram shown below. Their functionalities are obvious from their names, but ask is you are not sure about any one. The function add() adds a double value at the and of the array. The function get() obtains a copy of the value stored at the location i. The function set() overwrites (changes) the value stored at the location i by the provided value. The printStats() function invokes all other stats related functions and prints them on the screen.
Here are the functions in UML format so you can copy-n-paste add(value: double): void get(i: int): double set(i: int, data: double): void sum(): double average(): double min(): double max(): double var(): double stdev(): double printStats(): void BankAccount Class
This class will have two instances of Statistics class. One will be used to store deposits and other one will be used to store withdrawals.
Here are the functions in UML format so you can copy-n-paste:
deposit(amount: double): void withdrawal(amount: double): void getBalance(): double getTotalDeposits(): double getTotalWithdrawals(): double getAverageDeposit(): double getAveragWithdrawal(): double getMinDeposit(): double getMinWithdrawal(): double getMaxDeposit(): double getMaxWithdrawa(): doublel getVarOfDeposits(): double getVarOfWithdrawal(): double getStdevOfdeposits(): double getStdevOfWithdrawal(): double printAllStats(): void Implementation Notes
For every class, all error conditions (in functions where errors can take place) must be identified and exceptions must be written and thrown. The exceptions must be “caught” only in the test() and process methods. [10 points] For every class that you write, please implement a generic print() function [5 points] that prints all the data “owned” by that class directly or indirectly. Also implement static test() function that tests all other functions without any user input (all values that are otherwise expected from the user will be hard coded), and at least 5 new entries into the array. Exceptions
All Exception classes can be written inside a single file called “myexceptions.h”. The constructors and functions of exception classes can be “inlined” like shown in the class. See lecture on Exceptions. NoDataException
This exception will be thrown by a function in Statistics class that needs the size of the array to be greater than zero. see more i need to make this asap c++ it’s a application for a bank account. the instructions are stated below.
Bank Account Specifications (Required) This Application stores every transaction as soon as a transaction happens. Only amount of the transaction is stored, the date of transaction or any other data is not stored by this class. When the application starts, it will ask the user about what is the maximum number of expected transactions. You will assume that the balance is zero when the program first starts. The application will allow the user to make deposits as long as the balance is not above $100,000 FDIC limit. The application will allow users to withdraw money as long as the withdrawal amount is no more than the available balance. The application will allow the user to print the available balance at anytime. The application will also allow the banker to print following statistics regarding the account at any time: balance total deposits total withdrawals average deposit amount average withdrawal amount minimum deposit amount minimum withdrawal amount maximum deposit amount maximum withdrawal amount variance of all the deposits variance of all the withdrawal standard deviation of all the deposits standard deviation of all the withdrawal Statistics Class [20 points]
This class will provide functions that are shown in the UML class diagram shown below. Their functionalities are obvious from their names, but ask is you are not sure about any one. The function add() adds a double value at the and of the array. The function get() obtains a copy of the value stored at the location i. The function set() overwrites (changes) the value stored at the location i by the provided value. The printStats() function invokes all other stats related functions and prints them on the screen.
Here are the functions in UML format so you can copy-n-paste add(value: double): void get(i: int): double set(i: int, data: double): void sum(): double average(): double min(): double max(): double var(): double stdev(): double printStats(): void BankAccount Class
This class will have two instances of Statistics class. One will be used to store deposits and other one will be used to store withdrawals.
Here are the functions in UML format so you can copy-n-paste:
deposit(amount: double): void withdrawal(amount: double): void getBalance(): double getTotalDeposits(): double getTotalWithdrawals(): double getAverageDeposit(): double getAveragWithdrawal(): double getMinDeposit(): double getMinWithdrawal(): double getMaxDeposit(): double getMaxWithdrawa(): doublel getVarOfDeposits(): double getVarOfWithdrawal(): double getStdevOfdeposits(): double getStdevOfWithdrawal(): double printAllStats(): void Implementation Notes
For every class, all error conditions (in functions where errors can take place) must be identified and exceptions must be written and thrown. The exceptions must be “caught” only in the test() and process methods. [10 points] For every class that you write, please implement a generic print() function [5 points] that prints all the data “owned” by that class directly or indirectly. Also implement static test() function that tests all other functions without any user input (all values that are otherwise expected from the user will be hard coded), and at least 5 new entries into the array. Exceptions
All Exception classes can be written inside a single file called “myexceptions.h”. The constructors and functions of exception classes can be “inlined” like shown in the class. See lecture on Exceptions. NoDataException
This exception will be thrown by a function in Statistics class that needs the size of the array to be greater than zero. see more

Explanation / Answer

import java.util.Scanner;

public class BankAccount

{

static long bankbalance=0;

public static long[] totdep;

public static long[] totwid;

public static void main(String[] args) {

Scanner sc=new Scanner(System.in);

System.out.println("what is your maximum no of transaction");

int maxtrans=sc.nextInt();

totdep=new long[maxtrans];

totwid=new long[maxtrans];

int x,d=-1,w=-1;

for(int i=0;i<maxtrans;i++)

{

System.out.println("what do you want if you want to deposite press 1 if you want to withdraw press 2 if you want to check you statistic regarding your account preaa 3");

x=sc.nextInt();

switch(x)

{

case 1:

{

d++;

System.out.println("enter the amount of deposite");

totdep[d]=sc.nextLong();

if(checkAccountOverload(bankbalance+totdep[d]))

{

bankbalance+=totdep[d];

}

else

{

System.out.println("your space out of range ");

totdep[d]=0;

d--;

}

break;

}

case 2:

{

w++;

System.out.println("enter the amount of withdraw");

totwid[w]=sc.nextLong();

if(checkAccountUnderload(bankbalance-totwid[w]))

{

bankbalance-=totdep[d];

}

else

{

System.out.println("not enough money ");

totdep[d]=0;

d--;

}

break;

}

case 3:

{

printAllStats();

break;

}

}

}

}

public static boolean checkAccountUnderload(long l)

{

if(l>0)

return true;

else

return false;

}

public static boolean checkAccountOverload(long b)

{

if(b>100000)

{

//System.out.println("your space out of range ");

return false;

}

else

return true;

}

public static void getTotalDeposits()

{

long sum=0;

for(int i=1;i<totdep.length;i++)

{

sum+=totdep[i];

}

System.out.println("total deposit is "+ sum);

}

public static void getTotalWithdrawals()

{

long sum=0;

for(int i=1;i<totwid.length;i++)

{

sum+=totwid[i];

}

System.out.println("total withdrawal is "+ sum);

}

public static void getAverageDeposit()

{

long sum=0;

for(int i=1;i<totdep.length;i++)

{

sum+=totdep[i];

}

System.out.println("total avg deposit is "+ sum/totdep.length);

}

public static void getAveragWithdrawal()

{

long sum=0;

for(int i=1;i<totwid.length;i++)

{

sum+=totwid[i];

}

System.out.println("total avg withdrawal is "+ sum/totwid.length);

}

public static void getMinWithdrawal()

{

long sum=0;

for(int i=1;i<totwid.length;i++)

{

if(sum>totwid[i])

sum=totwid[i];

}

System.out.println("total min withdrawal is "+ sum);

}

public static void getMaxWithdrawal()

{

long sum=0;

for(int i=1;i<totwid.length;i++)

{

if(sum<totwid[i])

sum=totwid[i];

}

System.out.println("total max withdrawal is "+ sum);

}

public static void getMaxDeposite()

{

long sum=0;

for(int i=1;i<totdep.length;i++)

{

if(sum<totdep[i])

sum=totdep[i];

}

System.out.println("total max deposite is "+ sum);

}

public static void getMinDeposite()

{

long sum=0;

for(int i=1;i<totdep.length;i++)

{

if(sum>totdep[i])

sum=totdep[i];

}

System.out.println("total min deposite is "+ sum);

}

public static void getVarOfDeposits()

{

long sum=0,var=0;

for(int i=1;i<totdep.length;i++)

{

sum+=totdep[i];

}

sum=sum/totdep.length;

for(int j=0;j<totdep.length;j++)

{

var+=Math.pow(totdep[j]-sum, 2);

System.out.println("variance of dep is "+ var/(totdep.length-1));

}

}

public static void getVarOfWithdrawal()

{

long sum=0,var=0;

for(int i=1;i<totwid.length;i++)

{

sum+=totwid[i];

}

sum=sum/totwid.length;

for(int j=0;j<totwid.length;j++)

{

var+=Math.pow(totwid[j]-sum, 2);

System.out.println("variance of wid is "+ var/(totwid.length-1));

}

}

public static void getStdvOfWithdrawal()

{

long sum=0,var=0;

for(int i=1;i<totwid.length;i++)

{

sum+=totwid[i];

}

sum=sum/totwid.length;

for(int j=0;j<totwid.length;j++)

{

var+=Math.pow(totwid[j]-sum, 2);

System.out.println("variance of wid is "+ Math.pow(var/(totwid.length-1), 0.5));

}

}

public static void getStdevOfdeposits()

{

long sum=0,var=0;

for(int i=1;i<totdep.length;i++)

{

sum+=totdep[i];

}

sum=sum/totdep.length;

for(int j=0;j<totdep.length;j++)

{

var+=Math.pow(totdep[j]-sum, 2);

System.out.println("variance of dep is "+ Math.pow(var/(totdep.length-1), 0.5));

}

}

public static void getBalance()

{

System.out.println("your account balance is "+bankbalance);

}

public static void printAllStats()

{

getBalance();

getTotalDeposits();

getTotalWithdrawals();

getAverageDeposit();

getAveragWithdrawal();

getMinDeposite();

getMinWithdrawal();

getMaxDeposite();

getMaxWithdrawal();

getVarOfDeposits();

getVarOfWithdrawal();

getStdevOfdeposits();

getStdvOfWithdrawal();

}

}