Posthelp

Posts 1–11 of 11 · Page 1 of 1
help
i want to Create a project that will read a textfile. In the textfile consists of a record of account number, debit or credit and amount of transaction.
You are to read the text file and put the data into an array. Search through the array and find the largest amount of deposit (credit) and largest amount of withdrawal (debit).
The format of the file called “transaction.txt” is:
accountnumber,dr/cr,amount
The delimiter is a comma.
You need to print preview all debit and credit transactions, separately, the total for each, FOR EACH ACCOUNT.
Display ON THE SCREEN the total number of transactions for debit and credit, the account number of the largest withdrawal and largest deposit.
Use Functions and Procedures where applicable.
DELIVERABLES:
1. Print Screen of the outputs (SCREEN OUTPUT and PRINT PREVIEW)
2. Printout of the coding

Example of Print Preview
Debit Transactions
Acct No. Amount
010010000130 30.00
50.00
Total 80.00
010010000234 40.00
Total 40.00
Grand Total 120.00
Credit Transactions
Acct No. Amount
010010000130 45.00
Total 45.00
010010000234 30.00
130.00
320.35
Total 480.35
Grand Total 525.35

transaction
010013110325,dr,190.00
010013942855,dr,29.00
010014499846,cr,300.00
019094989982,dr,390.00
020994888752,cr,988.00
094099888029,dr,39000.00
010013110325,cr,398.00
010014499846,dr,388.00
090998847745,cr,4039.99
010014499846,cr,399.00
Homework? Right
Quote Originally Posted by 'Bruno View Post
Homework? Right
Looks like it.
Excel ?

Set your own split mark, and load the data?
i wanna make it in vb
Code:
Dim sw As IO.StreamWriter = New IO.StreamWriter("C:\transaction.txt")
sw.Write(<output text>)
sw.Close()
you do the rest of the code
man i need the complete form
Quote Originally Posted by niledilta View Post
man i need the complete form
Then learn to code? It's literally the easiest shit ever.
Quote Originally Posted by LilGho$t View Post
Then learn to code? It's literally the easiest shit ever.
I AGREE WITH YOU LilGho$t ... If this were Facebook, I'd LIKE to many many times over. I'm the culprit who gave the question to my students. Guys, SEE ME if you need help.
Algorithm required:
1. Read the text file
2. Split the data
3. Split data is already in array but send it over to another array (why? see me for explanation)
4a. Sort data according to account number
4b. Sort data according to transaction type
5. Make the print preview (how? See me to know how)
Quote Originally Posted by MrLect View Post
I AGREE WITH YOU LilGho$t ... If this were Facebook, I'd LIKE to many many times over. I'm the culprit who gave the question to my students. Guys, SEE ME if you need help.
Algorithm required:
1. Read the text file
2. Split the data
3. Split data is already in array but send it over to another array (why? see me for explanation)
4a. Sort data according to account number
4b. Sort data according to transaction type
5. Make the print preview (how? See me to know how)
whoops i wrote my example for writing to the file xD
To read a text file via link, you could just:

Code:
Dim request As HttpWebRequest = HttpWebRequest.Create("URL.txt")
        Dim response As HttpWebResponse = request.GetResponse
        Dim read As System****.StreamReader = New System****.StreamReader(response.GetResponseStream)
        Dim r As String = read.ReadToEnd
Then just split everything else accordingly
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?