• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

case statement, import file, output file

 
Lily Zulkipli
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, to run a program, I must include text file.
When I run, I must keep my files running from the text file.

Here is the text file.


a 54 AB123 Orange Pte Ltd
A 100 CD456 Apple Pte Ltd
A 153 EF778 XYZ Pte Ltd
a 2415 GH123 Mango Pte Ltd
B 14 IJ456 Xin Yin Pte Ltd
B 20 KL789 Mangnolia Pte Ltd
b 110 MN123 Fresh Mango Pte Ltd
b 117 OP456 Kiwi Pte Ltd
B 6 XT123 Banana Pte Ltd

There are 100kg, 20kg, 10kg and 5kg provided.

(Note that: 'A' or 'a' cannot accept 100 kg)
(Note that: 'B' or 'b' cannot accept 100 kg and 20 kg)

and coding.




the output must be in terms of this:


EXCELLENT FERTILIZER WHOLESALER SDN BHD
WEEKLY ORDER REPORT

_________________________________________________________________________________________________________________
RETAILER YZ123 SUPREME EXCELLENT PTE LTD
_________________________________________________________________________________________________________________

ORDER: 10 KG

10 KG SACKS 1

TOTAL NUMBER OF SACKS: 1

ORDER SHORT BY: 0 KG

INVOICE: $11.70




_________________________________________________________________________________________________________________
SUMMARY
_________________________________________________________________________________________________________________

1 ORDERS PROCESSED

10 KG SACKS 1

TOTAL NUMBER OF SACKS: 1

ORDER SHORT BY: 0 KG

TOTAL AMOUNT INVOICED: $11.70



the case A is still not working. thus cannot run :/
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34072
333
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "not working"?
 
Lily Zulkipli
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i try to run, but the program is not working. so i guess there's must be something wrong with my case statement perhaps?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again, what do you mean by "not working"? Do you mean that your computer blue-screens? That clicking the Run button (or menu item) does absolutely nothing at all? Or that Eclipse crashes? Or do you mean that the app runs but you get an exception? Or do you mean that the app runs but you don't get the results you though you would get? Or is it something else? Please tell us the exact behavior you are seeing when you attempt to run the app.
 
Lily Zulkipli
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"or do you mean that the app runs but you get an exception?"

"do you mean that the app runs but you don't get the results you though you would get"

yes i was talking about these part, i was wondering what my mistakes are in the coding. sigh
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are getting an exception, post the exception stack trace.

If the app is not behaving as you expect, tell us exactly what the app is doing, and what it should be doing instead. In other words, tell us what you want the app to do (be very specific), and then tell use what the app is doing 9once again, be very specific)

Bottom line: we cannot help you if you do not TellTheDetails
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic