subject
Engineering, 10.11.2019 06:31 octavioC2

Bank account class design a bankaccount class that represents a basic bank account. the class constructor should accept the account’s number, current balance, and name of owner. the class should also have methods for subtracting the amount of a withdrawal and adding the amount of a deposit. write code to do the following: public class static constants (declare to be final): min_length = 2; max_length = 40; string default_name = "nobody"; int min_balance = 0; int default_number = 0; int min_number = 0; int max_number = ; private member data include three members: balance double; owner string; accountnumber int; instance (public) methods you should provide the following instance methods: bankaccount (double initbal, string name, int number) - constructor should initialize the balance, account number, and owner as specified. overload the constructor as follows: bankaccount (double initbal, string name) - initializes the balance and owner as specified; randomly generates the account number. bankaccount(string name) - initializes the owner as specified; sets the initial balance to min_balance and randomly generates the account number. void deposit(double amount) - a method that accepts an argument for the deposit amount. the method should add the argument to the account balance. include appropriate value checks when applicable void withdraw(double amount) - a method that accepts an argument for the amount of the withdrawal. the method should subtract the argument from the balance. void withdraw(double amount, double fee) - overload the withdraw method with one that also takes a fee and deducts the fee from the account. include appropriate value check. accessors for each field (instance member). mutators for the account number and owner fields. void display() – a method that clearly shows the bank's data. void close() – a method that closes the current account by appending "closed" to the account name and setting the balance to 0. (the account number should remain unchanged.) this method also decrements the total number of accounts. private static methods private static validation to filter client parameters. these will support your public methods. the class should only allow string names that have between 2 and 40 characters. it will only allow bank account numbers that are between the numbers 0 and . it will also only allow a positive balance. any other value will be considered a user error and the client will not be allowed to set such values. boolean isvalidname( string name) - a method that mutators can use to determine whether a string is legal. this method returns true if the string is not null and its length is between min_length and max_length (inclusive). it returns false, otherwise. boolean isvalidbalance(double initbalance) - a method that mutators can use to determine whether a balance is legal. this method returns true if the balance is greater than 0. it returns false, otherwise. boolean isvalidnumber(int acctnum) - a method that mutators can use to determine whether an account number is legal. this method returns true if the account number is between min_number and max_number (inclusive). it returns false, otherwise. part 2: transaction class main() write a program transaction. java that creates and initializes three bankaccount objects and enters a loop that allows the user to enter transactions for either account until asking to quit. at the beginning of each day, print the summary for each account then have the user enter the transactions for that day.

ansver
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 03.07.2019 15:10, breannaasmith1122
Two flowing streams of argon gas are adiabatically mixed to form a single flow/stream. one stream is 1.5 kg/s at 400 kpa and 200 c while the second stream is 2kg/s at 500 kpa and 100 ? . it is stated that the exit state of the mixed single flow of argon gas is 150 c and 300 kpa. assuming there is no work output or input during the mixing process, does this process violate either the first or the second law or both? explain and state all your assumptions.
Answers: 1
image
Engineering, 04.07.2019 18:20, cxttiemsp021
Atank with constant volume contains 2.27 kg of a mixture of water phases (liquid-vapor). in the initial state the temperature and the quality are 127 °c and 0.6, respectively. the mixture is heated until the temperature of 160 oc is reached. illustrate the process in a t-v diagram. then, determine (1) the mass of the vapor in kg at the initial state, (2) the final pressure in kpa.
Answers: 3
image
Engineering, 04.07.2019 18:20, AnonymousLizard52303
A2-m rigid tank initially contains saturated water vapor at 100 kpa. the tank is connected to a supply line through a valve. steam is flowing in the supply line at 600 kpa and 300 c. the valve is opened, and steam is allowed to enter the tank until the pressure in the tank reaches the line pressure, at which point the valve is closed. a thermometer placed in the tank indicates that the temperature at the final state is 200°c. determine (a) the mass of steam that has entered the tank (b) the amount of heat transfer.
Answers: 3
image
Engineering, 04.07.2019 18:20, rhussein6452
Wiy doeres rere okhn a pump whon working betwon the same pressure range?
Answers: 2
You know the right answer?
Bank account class design a bankaccount class that represents a basic bank account. the class constr...

Questions in other subjects: