Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

c program please help due sunday

You are asked to write a program to organize accounts in a bank.  Suppose all the accounts are stored in a data file called “account.dat”.

 

A typical input data file looks like:

Need assignment help for this question?

If you need assistance with writing your essay, we are ready to help you!

OUR PROCESS

Order

Payment

Writing

Delivery

Why Choose Us: Cost-efficiency, Plagiarism free, Money Back Guarantee, On-time Delivery, Total Сonfidentiality, 24/7 Support, 100% originality

 

1234456

1 8 1943

Margaret Mitchell

1000.00

3456781

1 12 1955

Mario Puzo

9930.00

 

For instance, the above file has information about two customers. For every customer, the first line gives the account number (of type string), the second line gives the birth date (month, followed by day, followed by year, all integers), the third line gives the first (string) and last (last) names, and the fourth line gives the account balance (float).

 

Your program should first read the information from this data file and store the information in an array (called customers) of objects.  Each array element corresponds to one customer and is an instance a class (header and implementation files) with the following members:

 

Private members:

            accountNumber (data type: a string)

birthMonth  (data type: integer)

birthDay (data type: integer)

birthYear (data type: integer)

firstName (data type: a string)

lastName (dat type: a string)

balance ( data type: float)

 

Public members

           void withdraw( float amount);

void deposit (float amount);

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

 

           customer(  );   // default constructor

// No parameterized constructor

           // you also need to define the necessary get and set functions

 

Your program should provide a menu that allows users to withdraw, deposit, and print balance.  The menu should allow users to create a new account for a new customer. Your menu should also allow users to save the updated account information (including the accounts that were newly created) to an output file called updated_account.dat.

 

An example of menu is given below:

 

 

————————–Menu—————————-

1-      New Account

2-      Withdraw

3-      Deposit

4-      Print Balance

5-      Save Accounts to File

6-      Quit

 

Please enter your choice (1-6):

———————————————————-

 

When you access an existing customer account (choices 2, 3, and 4 in the menu), you need to ask the user for the account number and then, use the account number as a search key to find the record in the customers array. Essentially, you execute a for loop through all the customers and find a match of the account number to locate that particular customer.

 

Component 1:   Software System Design

 

Provide a use case diagram and a class diagram for your project

 

Component 2:   Assurance of Software Correctness

 

Find out a set of preconditions and postconditions for each function in this project.  Summarize the result in the following table.

 

Function name

Precondition

Postcondition

 

 

 

 

Component 3:   Software Testing

 

Design a complete suite of test cases for all possible scenarios in using your program. Summarize your test plan in the following table.

 

Reason for Test Case

Input Values

Expected Output

Observed Output

 

 

 

 

 

 

Component 4:   Software Documentation

 

Precede each function with the following standard information:

 

//   Purpose: …

//   Author: ….

//   Creation Date: …

//   Last Modification Date: …

//   Precondition:  

//   Postcondition:  

 

Also, include a comment at the beginning of the program that includes the following information:

 

//   Purpose: …

//   Author: ….

//   Creation Date: …

//   Last Modification Date: …

 

Component 5:   Screen Shots

 

Create a number of screen shots to demonstrate the running results of your program.

 

 

 

 

Submission of Your Work

 

You need to prepare a SINGLE MS word document that contains all of your answers to Components 1-5 as well as your source code (by copy-and-paste).

 
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "Newclient"