Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

You have been asked to write a program to organize accounts in a bank. Suppose all the accounts are stored in a data file called account.dat. Your program should read in the information from this data file and then provide on-line instructions for a user's transactions including withdraw, deposit, and check balance. Your program should also allow users to create a new account for a new customer. Finally, your program should save the updated information to an output file called updated_account.dat.

You should use a class to store the information for each customer, which contains

private data members:

Birth_date (data type: a struct)

Name (data type: a struct)

Balance_saving ( data type: float)

Balance_checking (data type: float)

public data members

           void withdraw( float amount, int account_type);

           void deposit (float amount, int account_type);

           void check_balance( ); // print out the balance on screen

           customer( );   // default constructor

          customer(Date birth_date, Name name, float initial_saving, float initial_checking); // parameterized constructor

The record for birth date should contain the following information:

Day (data type: integer)

Month (data type: integer)

Year (data type: integer)

The record for customers' name should contain

First_name (data type: string)

Middle_name (data type: string)

Last_name (data type: string)

The customer's name is followed by balances in saving and checking accounts.

A typical input data file looks like:

1 8 1943

Margaret Dana Mitchell

1000.00

5000.00

1 12 1955

Mario C. Puzo

9930.00

0.00

An array of class should be used to hold the information of all the accounts in the data file.

When your program writes the information of updated accounts to the output file, you don't need to sort them. However, you need to include any new account that was created interactively by using your program.

Hints:

What you need to do is to read in all the information in the data file and assign the information to a Customer array. Each array element is one customer, and each customer has the information of Birth Date, Name, and balances. In this question, you are not requested to create an account number for each customer. You may do so if you like. But, it is not required. When you access a customer, you may use birth date or name as a search key to find the record in the Customer array. Essentially, you just do a for loop through all the customers and find a match of the key to locate that particular customer.

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9885664

Have any Question?


Related Questions in Computer Engineering

Run the huffman coding algorithm on the following

Run the Huffman coding algorithm on the following input: Alphabet C = {p, r, a, i, s, e, d}, with frequencies f as percentages= {12, 16, 16, 12, 16, 16, 12}. Draw the optimal coding tree and the (weighted) average code l ...

Can someone please help in this question - if the the price

Can someone please help in this question - If the the price of a pack of 35-count Wipes box-pack increased by 12% while revenue from those wipes increased by 5%. Calculate the own-price elasticity of demand for Wipes box ...

Uranium vi fluoride is crucial for the enrichment of

Uranium (VI) fluoride is crucial for the enrichment of weapons-grade uranium. If a 1.0 mol sample of helium effuses in 255 s, how many seconds will it take for the same amount of uranium (VI) fluoride to effuse under the ...

Give an example of a binary relation which is not

Give an example of a binary relation which is not transitive, and then give an example of a binary relation which is reflexive and transitive but not connected.

Requirementsnew payroll functionality to allow global

Requirements New payroll functionality to allow global employee to submit banking information to get paid electronically (i.e. direct deposit paycheck to bank account). Initial pilot has 3 countries in Asia Pacific, Euro ...

Question create an android app to show others a collection

Question: Create an Android app to show others a collection of five to eight items that you intend to sell through your app. Choose any items you desire. Include the following features and functions in your app: • An ope ...

Say you want to match ip addresses however its likely that

Say you want to match IP addresses. However, it's likely that an invalid IP address such as 192.168.1.256 will match with your regex as well. What would you would need to do to validate that an IP address is valid, and w ...

Storing the integer 5 value in a binary file 00000000

Storing the integer 5 value in a binary file: 00000000 00000000 00000000 00000101, How do you write value5 to this formation 0000101? Storing the integer 5 value in a text file: 00110101, How do you write value5 to 00110 ...

Excel discussionconsider this using the mouse to point and

Excel discussion Consider this.... Using the mouse to point and click is one way to work on a computer. Often, the same work can be accomplished using just the keyboard, using shortcut keyboard combinations. For example, ...

Question when a syscall is called which register must have

Question : When a syscall is called which register must have the syscall number? Which syscall is a must for every program? Why?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As