UQ Students should read the Disclaimer & Warning

Note: This page dates from 2005, and is kept for historical purposes.

COMP2301 – Assignment Four – File I/O in C++

This assignment is a pass/fail assignment. I achieved a pass.

The goal of this assignment is to gain experience using C++ for object-oriented programming.

In this assignment, you will become familiar with:

Specification

Develop a command-line program to read and manipulate a file of internet banking transactions. Each individual transaction starts on a new line and contains six comma separated transaction details.

  1. Timestamp: 10-digit: [yymmddhhnnss],   [yy] = year, [mm] = month, [dd] = day, [hh] = hour (from [00] to [23]), [nn] = minutes,  [ss] = seconds.
  2. Customer’s last name:
  3. Customer reference number: 10-digit number.
  4. Account type : “Check” for (Checking account), “Sav” for (Savings account) or “Cred” for (Credit card account).
  5. Transaction type : “Dep” for (Deposit) or “With” for (Withdrawal).
  6. Transaction amount: [dollars.cc], where [dolars] = integer dollars and  [cc] = integer cents.

Example input file containing four transaction: ( Timestamp, Customer’s last name, customer reference number, Account type , Transaction type , Transaction amount )
 

Functions required for the command line interface

General

Compiled (WIN32) binary (188 KB)
transaction.h
transaction.cpp

transaction.h

transaction.cpp

Code © Copyright 2004 Ned Martin

19-May-2004