Question: Part 0 1 - Make Checking Account For this part you must write a public static method named makeBankAccount. This method will take two arguments.

Part 01- Make Checking Account
For this part you must write a public static method named makeBankAccount. This method will take two arguments. The first argument will be a String and the second argument will also be a String. This method must instantiate a new BankAccount object, then store the first argument value in the BankAccount object's accountHolderName attribute, and store the second argument value in the BankAccount object's accountNumber attribute. This method must also initialize the accountBalance variable of the BankAccount object to zero. Finally, this method must must return the new BankAccount object.
After you have finished writing this method, Run your code to find and then fix any syntax errors. You may also wish to write some other code (in the main method) to call and test your method(s). When you are confident that your method is structurally and logically correct, then submit your code to the auto-grader for feedback. Your code should pass Structure test 1 and Logic tests 1.1 and 1.2 before you continue.
Part 02- Display Account Info
For this part you must write a public static method named displayAccountInfo. This method will take a BankAccount reference as an argument, and it will return nothing. When called, and a BankAccount with an account holder named Bob Smith and and account number 21-573-6291 and a balance of 100.00 is passed as an argument this method will print out to the terminal, a message exactly like the following:
Account number : 21-573-6291 Account holder name : Bob Smith Account Balance : $100.00
If this method is called with a BankAccount with a different account holder name (like Anika Patel) and a different account number (like 58-923-0042), and a different balance (like 2754.93)then the message will be different, like this:
Account number : 58-923-0042 Account holder name : Anika Patel Account Balance : $2754.93
After you have finished writing this method, Run your code to find and then fix any syntax errors. You may also wish to write some other code (in the main method) to call and test your method(s). When you are confident that your method is structurally and logically correct, then submit your code to the auto-grader for feedback. Your code should pass Structure test 2 and Logic tests 2.1 and 2.2 before you continue.
Part 03- Charge Service Fee
For this part you must write a public static method named chargeServiceFee. This method will take a BankAccount as its first argument, and a double (repesenting a service fee anmount) as its second argument, and it will return nothing. This method will simply decrease the value of the accountBalance attribute of the BankAccount object by the amount of the second argument value.
Remember that, as non-primitive data types, BankAccount objects are passed by reference to methods. This means that the method will have access to make changes to the original BankAccount object. So, if we call this method and pass, as the first argument, a BankAccount object with a balance of 100.00, and a second augment value of 10.00(the service fee), then after this method returns, the value stored in the BankAccount object's accountBalance attribute will be 90.00.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!