Ask C/C++ Expert


Home >> C/C++

The objectives of this assignment are to:

1. Refresh your knowledge and skill in Java.

2. Gain experience and skill in file I/O.

3. Gain experience with a debugger.

4. Gain understanding of the need to organized data in memory.

5. Refresh your understanding of Javadoc documentation.

6. Refresh your practice of good programming techniques.

You have been asked to create a program for a Bank to process a set of transactions (i.e., deposit and withdraw) against a set of accounts, and produce a statement for each account. Input to the program will be two files one containing a list of accounts and the other a list of transactions. Both files are binary. Output will be a report to standard out. The format of each file is as follows:

Accounts.dat a binary file containing a set of records. Each record represents an account. The format of a record is:

Fields

Description

Account number

4 byte two's compliment

First name

10 bytes ASCII, blank padded

Middle Initial

1 byte ASCII

Last name

10 bytes ASCII, blank padded

Balance

Double precision floating point

Transactions.dat a binary file containing a set of records. Each record represents an account. The format of a record is:

Fields

Description

Account number

4 byte two's compliment

Date

1 byte two's compliment for month, followed by 1 byte two's compliment for day, followed by 2 bytes two's complement year

Type

1 byte ASCII - either D for deposit or W for withdraw

Amount

Double precision floating point

Your program should pass the files in the on the command line. In the event the files are not passed on the command line, then ask the user to enter the file names for the accounts, transaction, and new accounts files. Using those files, the program will process the transactions and print the statement report. A sample output of the statement report is as follows:

Bank Statement

Account No        : 73829123

Account Name      : Bill T Smith

Beginning Balance : $  1030.50

Ending Balance    : $  1018.28

         **Transaction Detail**

 Date      Type      Amount       Balance

10/12/09  Withdraw  $   500.00   $   530.50

10/13/09  Withdraw  $   300.00   $   230.50

10/14/09  Deposit   $  1287.78   $  1518.28

10/15/09  Withdraw  $   500.00   $  1018.28

Bank Statement

Account No        : 73829999

Account Name      : Mary P Jones

Beginning Balance : $  3000.89

Ending Balance    : $  3500.89

         **Transaction Detail**

 Date      Type      Amount       Balance

10/16/09  Deposit   $   500.00   $  3500.89

 Requirements

• Your source code should use proper object-oriented style. That is, the main program should only instantiate a class and call major methods that perform all of the work.

• Your source code should be documented using Javadoc style according to the course standards.

• Follow good programming practices. Naming conventions, separation of io from business objects, indentation, etc.

• Your test program must be named RunBankStatements.

• Define all classes in packages or subpackages of edu.iup.cosc310.bank.

• Input requires processing two blank padded fields. Develop some means to define the input of blank padded fields in just one place.

• Provide an appropriate set of getter and setter methods (i.e., don't provide setters for fields that cannot be changed).

• Do not provide a setBalance method for an account. Instead provide a processTransaction method. It should adjust the accounts balance accordingly and record the transaction for the account.

• Hide the representation of the one to many relationships between a bank and accounts and between accounts and transactions. Provide some means to iterate over the many.

Deliverables:

1. A zip file of your project named lastname1.zip containing all source files and class files. For example, if your name is John Smith, the file name should be smith1.zip. Upload to moodle by the due date.

2. Printout of all source files submitted by the due date and time. Submission is not complete until both the zip file and the print outs are received. Plan ahead when printing your code prior to class.

3. Printout of the output from your program.

All papers should submitted as a single packet and stapled in the upper left corner.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M91644382
  • Price:- $60

Priced at Now at $60, Verified Solution

Have any Question?


Related Questions in C/C++

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

  • 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