i Need 2 design a program that will be able to read the two files of an EWAY Checkpoint (toll for moterway) and customer database, that will be able to produce a statement for each customer who has non-zero balance.
and includes:

Headings of the statement
Customer information: customer’s name, address and customer number.
Column heading: Date, Time, Station, Amount.
All records charged to the customer.
Total amount the customer owned.

plz show me how 2 do this...

read in the toll file, read in the customer file. store the customer's data into a structure. if the customers balance is > 0 then print out the data. what is it that u dont know how to do? we dont do homework here. write some code, when u get stuck then ask a specific question.

This is so far what ive done for the c++ part. although, its confusing, becoause i dont know how 2 connect my log.txt file which has the customers tag_number, date, time, and toll with the customer.txt which has the tag_number, and customer details e.g address phone etc.. i dont know what to do with the strings.. plz help

#include<iostream.h>
#include <string.h>
#include <fstream.h>
#include <cstring.h>
#include <stdlib.h>



void PrintCustomerStatement()
{


sting tag_number, date, time, toll_station;
char duration[25];
amountDue = 0;
string tagNo = tag_number;


PrintCustomerStatement();


fstream InStream("log.txt", ios::in);     // open file


if (InStream.fail())                             // check for success
{
cerr << "\n Unable to open 'customer.txt'!\n";
exit (-1);
} // end if



while (!InStream.eof())                  // while not end-of-file:
{
InStream >> tag_number;               //  input tag number
InStream >> date;
InStream >> time;
InStream >> toll_station;



if (tagNo == tag_number)
{
amountDue = PrintCustomerStatement(tag_number, date, time, toll_station);
// invoke subordinate module
totalAmountDue = totalAmount + amount;
} // end if
} // end while



int strcmp (const char*s1, const char*s2)


cout << "Enter Customer ID:";
cin >> customer_id;
int strcmp (customer_id, cust_id)
if customer_id = cust_id
{



// Function Print Customer Statement
void PrintCustomerStatement(){
cout << "\nEWAY BILL                                  E-way Motorway\n"
<< "                                         "<<customer_id;
cout << "\n \n"<<surname <<initial;
cout << " \n"<< Stnum <<Stname <<StType;
cout << " \n"<<suburb <<state <<postcode;
cout << "E-way motor bill for "<<customer_id << endl << endl;
cout << "  Date       Time     Toll   Amount\n";
} // end printHeading


// Function processThisRecord.
processThisRecord(string tag_number, string date, string time, string toll_station, char* toll_station)
{


int toll_station;
amount;


toll_station = A (2.20);
toll_station = B (2.80);
toll_station = C (3.30);
toll_station = D (3.80);


amount = (toll_station);
cout << date << "   " << time  << "   "<< toll_station  <<"   $" << amountDue << endl;
return amountDue;
}



// Function tollCharge
void tollCharge(string costumer_id) {
cout << endl << endl;
cout << "Total charge usage of E-way " << costumer_id
<< "                   " << total << endl;


}
}
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.