FloridaTech - College of Engineering

CSE1001 - LABORATORY


Lab Assignment 12 :


To be submitted in the lab

Part 1

Problem :
Department Store Problem

The customer credit manager of the Greenly Department Stores has requested a new program to perform the weekly update of the customer account file. This account file contains information on all of the customer's who have charge account with the company. A customer's account must be changed when a purchase is charged or a payment is made. An account must be also be changed when the credit manager raises or lowers a customers credit limit. The data entry staff enters all changes into a text file. Once a week the items in this text file are used to bring the accounts up to date.

Input : 

1. A sequential file(Old Master file) containing an account number, a name, an address,
   a credit limit, and a current balance for each customer.
2. A text file(Transaction File) . Each line in this file contains the information for
   a single customer transaction. This information includes 
     a.Account Number-A unique number that identifies the customer.
     b.Transaction Type-The word Payment, Charge, or Limit.
     c.Transaction Amount-A positive float value.

Output :

1. A new sequential file(New Master) that contains all of the updated customer information.
2. A text file containing a line for each customer whose balance is over his or her assigned 
   credit limit. This line should contain the account number, customer name, and the amount 
   the balance is over the credit limit.  

Your Task :

Modify the Department Store program so that it handles transactions to delete accounts from the store's files. A delete transaction contains the account number and the word Delete. An account is deleted by not writing the account record to the new master file. So that any outstanding balance can be billed to the proper person, all the account information should be written to the report file with an appropriate message.

The message that should be written in the report file is 

<Account number>  <First Name>  <Last Name>   Deleted  <Balance>


Program to be modified

Program to create Old_Master.Dat


Professor:Dr.Stansifer
G.S.A : Rishi Gupta
Last Modified :4/4/99