Create a new account for a new customer

Assignment Help Basic Computer Science
Reference no: EM13306343

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.

 

Reference no: EM13306343

Questions Cloud

Determine if a string is a palindrome : Using the stack and queue class, determine if a string is a palindrome. A palindrome is a string (empty to many sentences) that reads the same forwards and backwards.
Improve the contracting process : Identify someone in your life who would benefit from taking this course, and explain the reasons why and speculate on what technology might be able to do in 15 years to improve the contracting process.
Write a few lines relating the following concepts : If the real interest rate is less than the growth rate of output, explain why governments can run a deficit yet not have to worry about the size of their debt.
Print the list after each value is inserted into the list : Generate 10 random numbers between in the range of 25 to 50. Insert them into a list, keeping the list in order as each value is inserted. Print the list after each value is inserted into the list.
Create a new account for a new customer : 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.
How many electrons would it take to fill the shell : Suppose that the spin magnetic quantum number ms had three possible values, rather than two. how many electrons would it take to fill the K shell
Determine what would be maximum load that covers right range : The testing machin that covers the right range of load is to be chosen. it is expected to load the material up to a strains of 3%. if th material must remain elastic over that range, what would be the maximum load
Describe a piece of john deere agricultural equipment : Describe a piece of John Deere agricultural equipment that utilizes GPS hardware and software. Describe how many RECs are placed on the equipment and where it is placed.
The mathematical model of the system : Prepare the report keeping in view all the attributes of the SOs given on next page. There will be a subsequent presentation to check some Consider damped of the attributes that cannot be addressed in the report.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Create memo for management-accounting information systems

Create a memo to your management in which you address significance of accounting information systems. Give some main features of accounting information system.

  Use active directory to establish security group memberships

How would you manage creation of novel user accounts in this organization? Utilizing Active Directory to establish security group memberships or manual creation and security.

  What is the const keyword in c++ and why would you use

What is the const keyword in C++? Why would you use the const keyword

  Describing problems with information systems management

Describe at least three issues/problems with Information Systems Management (ISM) in a named organization.

  The command sequence in a normal smtp session

1.What would the command sequence in a normal SMTP session be? Use C: to preface a command issued by the client and S: to preface a command issued by the server.

  Display the highest score out of the three

For your assignment, write a program that retrieves three scores. Each of the three scores should be from a different player, and you want to display the highest score out of the three. Save your assignment as a .cpp file. Place this .cpp file in ..

  Create a second array to solve

Hence, the first item in the array should become the last one, and the last one in the array should become the first one, etc. You may NOT create a second array to solve this problem!

  Derive the simplest product-of-sums expression

Derive the simplest product-of-sums expression for the function f(x1,x2,x3,x4)= (x1'+x3'+x4')(x2'+x3'+x4)(x1+x2'+x3') HINT: use consensus property.

  Floating point format has an n-bit frac field

Suppose a floating point format has an n-bit frac field and a k bit exp field. What is the smallest integer that can be represented exactly? Assume that k is large enough not to provide any limitations on the problem. What is the integer for IEEE-754..

  Describes the benefits of getting a college education

Change the Font style and Font size of the numbers in the Worksheet and change the Row and Column headins to Bold Font.

  Question based on artificial intelligence

If the brain is a computer and the mind its workings, is this fitting analogy of the computer and its software? What would happen if we had dedicated computers with a huge number of neuron circuits?

  Examine and assess the main computing problems

Use at least three (3) quality resources in this assignment. Note: Wikipedia and similar Websites do not qualify as quality resources.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd