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

  Write a program to print duplicates in a string and count

1. write a program to print duplicates in a string and their count.

  What is the name of the keyboard

research the Internet and find out all that you can about the keyboard layout that you are using. Then write me a one page essay on what you found.

  What are the modes

What are the modes, the conceptual models of transfer, the advantages, and the disadvantages of pass-by-value, pass-by-result, pass-by-value result, and pass-by-reference parameter-passing methods?

  Write a class encapsulating the concept of a course

Write a class encapsulating the concept of a course, assuming a course has the following attributes; a doce (for instance, CS1), a description, and number of credits (for instance, 3.) Include a constructor, the accessors and mutators, and methods..

  Discuss the fundamental advantages and disadvantages

Companies that currently use expert systems. Next, discuss the fundamental advantages and disadvantages of using expert systems instead of human expertise within the companies that you have selected. Provide a rationale to support your response..

  What is the paintcomponent method

What is the paintComponent method? How is it used in Java graphics? How does a program intentionally cause the paintComponent method to execute?

  What is the estimated payback period of a project

What is the estimated payback period of a project whose cost is $90,000 and benefits estimated to be $60,000 in each of the next three years?

  Describe nonrecursive method for finding by link hopping

Describe a nonrecursive method for finding, by link hopping, the middle node of a doubly linked list with header and trailer sentinels.

  Characteristics of professionals collapse

How might definitions of plagiarism vary across cultures and Characteristics of professionals Collapse

  Significance of strategic management

Explain the significance of strategic management to support telecommunications planning model.

  Container that holds the water

The container that holds the water for the football team is 3/10 full. After pouring in 11 gallons of water, it is 4/5 full. How many gallons can the container hold

  Write a complete program in a class named showdesign

Write a complete program in a class named ShowDesign that uses the DrawingPanel The window is 200 pixels wide and 200 pixels tall. The background is white and the foreground is black.

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