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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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