Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

COMPLETE CODE IN CPP USING BST In this assignment, you are required to store the bank users details. You are required to code the following

COMPLETE CODE IN CPP USING BST

In this assignment, you are required to store the bank users details.

You are required to code the following functions

1) Insertion [log(n) times]

2) Deletion [log(n) times]

3) Funds-Transfer from one account to another account [log(n) times]

4) Deposit [log(n) times]

5) Withdraw [log(n) times]

6) History [of last 5 transactions]

7) Searching [log(n) times]

8) Query Handling:

a. Print the record of all the accounts of any branch [branch is encoded in the first 3 letters]

b. Print the records of all male accounts [4th digit is used for gender, 0-4 Male, 5- 9]

c. Print the records of all the male accounts of a specific branch

d. Print all the records of salary accounts

e. Etc.

You are required to create a menu page to execute the systems functionality.

Account Number Pattern

All the accounts will be encoded in the form of digits [0-9]. The first three digits will present the branch code. The fourth digit will present the gender (0-4 digits will be used for males and 5-9 will be used for females). The fifth digit will present the account type (0-Current, 1-Saving, 2-Salary, 3-Education, 4-IT, 5-Government, 6-Bonds, 7-Foreign, 8-Agriculture, 9-Ehsas). The last four digits will be used for the account number of a specific person.

Example Account: 001234567

Branch: 001

Gender: Male [4th digit is 2]

Account Type: Education [3]

Account Number: 4567

Restrictions: You are only allowed to use Arrays to store the account number.

Data Storage:

Account Number

Account Title

Transaction History

Balance

Account Type

Gender

Data:

You are required to generate 1000 nodes randomly. You have to write a function that will generate random account details (such as account number, account title, and account balance). The type of the account and gender can be extracted from the randomly generated account number, as we know that the 4th digit represents the gender while the 5th digit represents the account type. This function will call the Insert_Node function for every account. Insert_Node function will detect the right position on the basis of the account number (that will be stored in the array) and then insert the node in the BST.

The function described above (function to generate random data) should be called immediately when the program started. After then the menu page should be open that allows the user to perform all the functions mentioned at the start.

Please feel free to contact me (by email or visit my office during visiting hours). In case of any confusion, you can discuss it with your fellows, but sharing code is strictly not allowed.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions