Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 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. 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

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

Computer Aided Database Design

Authors: Antonio Albano, Valeria De Antonellis, A. Di Leva

1st Edition

0444877355, 978-0444877352

More Books

Students also viewed these Databases questions

Question

Examine various types of executive compensation plans.

Answered: 1 week ago

Question

1. What is the meaning and definition of banks ?

Answered: 1 week ago

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago

Question

3.What are the Importance / Role of Bank in Business?

Answered: 1 week ago