I've got an assignment to hand in a week time, i was just wondering if anyone is willing to help me out with it.
the problem iam facing at the moment is to take the input from a text field and insert it into a file.
the whole program is about a banking system which the user is able to Credit, Debit and check the balance of his or her account. the following is the specification of the program.
_____________________________________________
REQUIREMENTS
Server-side: create the necessary facilities to service customer needs for basic transactions on a personal bank account.
Client-side: create an interface to permit customers to remotely access basic transactions on a personal bank account server.
Each transaction will require:
a customer identifier: a string
an indicator for the transaction type: { C , D , B }
C: Credit; D: Debit; B: Balance enquiry.
a value representing the difference a float
between the opening and closing balance
an opening balance: a float
a closing balance: a float
the date of the transaction: a date
a transaction concluded ?success? flag: a boolean
A total of 1 only text files should be used by your system (server-side) to store the account details, i.e. each transaction, for every customer. Each transaction should be recorded as a single line entry of tab separated values. You may wish to create a second file to maintain a list of valid customer Ids: when a new entry is made to this file it should be accompanied by the creation of an opening transaction. This should be recorded within the account details file as a transaction, a Balance transaction, of zero value, on an opening balance of zero.
--------------------------------------------
the file name should be: transactions.txt and should look exactly like the following:
000001 B 0.00 0.00 0.00 1 2 2003 true
000002 B 0.00 0.00 0.00 1 2 2003 true
000003 B 0.00 0.00 0.00 1 2 2003 true
000004 B 0.00 0.00 0.00 1 2 2003 true
000005 B 0.00 0.00 0.00 1 2 2003 true
000006 B 0.00 0.00 0.00 1 2 2003 true
000007 B 0.00 0.00 0.00 1 2 2003 true
000008 B 0.00 0.00 0.00 1 2 2003 true
000009 B 0.00 0.00 0.00 1 2 2003 true
-----------------------
for the exact layout please email me on : basmah3@hotmail.com
___________________________________________
to see the MARK REQUIREMENTS/CRITERIA please find the attachment.
_______________________________
Iam not good at Java at all but i wana get a good marks on this assignment i know there must be some top java programmers in this forum so please help......
im using FilePrinter to insert a line into the file specified in the code. the following is the code used :
----------
PrintWriter out = new PrintWriter(
new FileWriter("Bank.txt"));
out.println();
out.close();
-------------
the line out.println(); is what causing the problem as i have no idea of what i should pass into this statement, i cant pass the text field, not even theSocket, and whatever i try i stil unable to print into the file.
Bookmarks