Question
C# Problem (1) Create a (simplified) C# class for a bank account object with the following 3 properties: account number (int type), customer name(string type),
C# Problem
(1) Create a (simplified) 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
(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. You just need to modify one of it to suit the object data type.
(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