Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

7. What strategies can people apply to resist popular culture?

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago