subject

You are to write a banking application in c# that keeps track of bank accounts. It will consist of three classes, Account, Bank and BankTest. The Account class is used to represent a savings account in a bank. The class must have the following instance variables:
a String called accountID
a String called accountName
a two-dimensional integer array called deposits (each row represents deposits made in a week). At this point it should not be given any initial value. Each row represents a week and each value in the row represents a deposit amount. Since the number of deposits can be different in each week, this will be a jagged array.
a double called balance, initially set to zero.
The class should have two overloaded constructors:
one takes parameters: accountID of type String and accountName of type String
the other takes parameters: accountID of type String, name of type String, and a two-dimensional integer array (this will be a jagged array).
Methods:
UpdateAccount: when called, simply goes through the deposits array and adds all the deposit amounts to the balance instance variable.
GetDeposits: When called this method will return a string representing the deposit amounts of the array.
ToString: returns a String which represents the ID, the name, the deposits, and the balance of a particular account as shown below. You must use the GetDeposit method in building the string. The output should look as shown below:
ID : 2605
Name :john doe
Deposits : 90 50 70 | 40 50 |
Balance : 300.00
The Bank class is used to keep track of the accounts of the bank. This class does not have a Main method as it is not the one that runs the application. The class must have one instance variable:
A one-dimensional array called accountsArray of type Account (the class Account is defined in the previous question). It will be able to take 10 accounts.
(Note: Feel free to create more instance variables, if there is a need.)
This class will have no constructors.
The class should have a method called AddAccount that takes a new account’s ID, name and a two-dimensional jagged integer array of deposits as parameters. Every time the AddAccount method is called with the appropriate values, it calls the Account constructor and assigns the newly created account to one of the elements of accountsArray. At each successful account addition, the method returns true, else it returns false.
The class should have a method called ApplyDeposits: goes through ONLY the populated elements of accountsArray and applies the deposit amounts (by calling the UpdateAccount method of the Account class).
The class should have a method called ToString. This method goes through the entire accountsArray and calls the ToString method of each element (each account). If the element is not populated, this method writes "No Account Found". Remember, the ToString method returns a string.
The final class, BankTest, will create an object of the Bank class and add ten accounts by calling the AddAccount method on the bank object. After adding the accounts, the test class will call the ApplyDeposits method. Finally, the test class will call the ToString method of the Bank object.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 03:00
With editing, word automatically displays a paste options button near the pasted or moved text. a. cut-and-paste b. drag-and-drop c. inline d. copy-and-carry
Answers: 1
question
Computers and Technology, 24.06.2019 10:20
Write a program that keeps asking the user for new values to be added to a list until the user enters 'exit' ('exit' should not be added to the list). these values entered by the user are added to a list we call 'initial_list'. then write a function that takes this initial_list as input and returns another list with 3 copies of every value in the initial_list. finally, inside print out all of the values in the new list. for example: input: enter value to be added to list: a enter value to be added to list: b enter value to be added to list: c enter value to be added to list: exit output: a b c a b c a b c note how 'exit' is not added to the list. also, your program needs to be able to handle any variation of 'exit' such as 'exit', 'exit' etc. and treat them all as 'exit'.
Answers: 2
question
Computers and Technology, 24.06.2019 12:00
An npn transistor is correctly biased and turned on if the a. base is negative. b. collector is negative. c. collector is positive with respect to the emitter and negative with respect to the base. d. collector is the most positive lead followed by the base.
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
Dereck works for long hours on his computer.  he frequently experiences physical strain by the end of the day because he does not follow an important rule of ergonomics with respect to the use of keyboards.  which of the following actions of dereck could lead to physical strain? a.  placing the keyboard exactly in front of him while typingb.  keeping hands and wrists straight while typingc.  using wrist pads throughout the dayd.  pounding at the keys on the keyboard while typinge.  resting his hands on the keyboard when he is not typing
Answers: 1
You know the right answer?
You are to write a banking application in c# that keeps track of bank accounts. It will consist of t...
Questions
question
Mathematics, 03.08.2020 14:01
question
Mathematics, 03.08.2020 14:01
question
Chemistry, 03.08.2020 14:01
question
Mathematics, 03.08.2020 14:01
question
Biology, 03.08.2020 14:01
question
Physics, 03.08.2020 14:01
Questions on the website: 13722367