how to write to java file in the best way?

How do I make my Java program write which line of the input file is invalid onto the error file?

  • How do I make my Java program write which line of the input file is invalid onto the error file? For example if the first line doesn't satisfy requirements which are balance has to be at least 50 and account numbers have to be different. Here is my BankAccount class: http://pastebin.com/m67194483 And here is my CustomerReport class (what I need help with): http://pastebin.com/m70bd83ae My problem is that I want the error file to output this: http://pastebin.com/m3205061b and currently; I have the error file with the following contents: http://pastebin.com/m52385cd7

  • Answer:

    If you want custom exceptions, you have to write them. If you want Objects with behaviors, you may have to re-engineer your hierarchy. I've done this student assignment so many different ways. I don't know what level of expertise you are allowed to demonstrate. //>========= abstract Account Savings extends Account Checking extends Account class Customer implements Transaction interface Transaction class Bank implements Transaction

Q&A at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.