Question
C# (1) Create a C# class for a bank account object with the following 3 properties: account number (int type), customer name(string type), and account
C#
(1) Create a C# class for a bank account object with the following 3 properties: account number (int type), customer name(string type), and account balance(double type).
(2) Define an array type as the bank account class to store the 10 bank accounts. Use a "for loop" to generate 10 bank accounts accordingly to the following specification: (a) Each account number is 7 digits with 5 digits random number (from 10000 to 99999) plus 2 check digits. The check digits are the sum of the five digits added together. (b) Use a List to initialize 10 customer names of your choice and randomly assign a name to each account customer name without duplication. (c) Randomly create and assign a balance amount to the account balance property ranging from $100.00 to $5,999.99. (d) Print the 10 account information during your creation of them, one line per account.
(3) Use one of the selection sort, bubble sort, or insertion sort to sort the array of 10 bank account objects into descending order of account balance.
(4) Print the 10 account information after they are sorted in descending order of account balance, one line per account. Compute and print the average account balance amount for the 10 accounts.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started