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
Related Q & A:
- How do I make a window in Java?Best solution by Stack Overflow
- How can I make a Spinner only by java?Best solution by stackoverflow.com
- How do I make a python web program that is on a ubuntu server allow access to the server?Best solution by Yahoo! Answers
- How do I make a video file smaller?Best solution by Yahoo! Answers
- How do I make my web browser java compatible?Best solution by answers.yahoo.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.