File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes help with constructing Java arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "help with constructing Java arrays" Watch "help with constructing Java arrays" New topic
Author

help with constructing Java arrays

Amir Ahmed
Greenhorn

Joined: Feb 19, 2013
Posts: 17
Hey everyone!

I'm working on writing a code that calculates income tax and store them in arrays. The program calculates tax per users input. I've wrote the code that gets the gross income then calculate the tax due after deducting dependents exemption. The program must use JOptionPane dialog box to get users input. User inputs are first name, last name, gross income, and number of dependents. I used "for" loop to collect the users input for however many users tax needs to be calculated. What i'm having trouble with is after asking the user how many users to calculate taxes for,

1. after collecting the user inputs, how do I store them in a array?
2. how do i assign to string and integer after parsing the gross income and number of dependents. I'm trying to use the array to display the first name, last name, gross income, and number of dependents all in a single dialog box?

I've seen other posts but most of them were really confusing and left wondering....

Thanks!
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

Amir Ahmed wrote:...

1. after collecting the user inputs, how do I store them in a array?
2. how do i assign to string and integer after parsing the gross income and number of dependents. I'm trying to use the array to display the first name, last name, gross income, and number of dependents all in a single dialog box?

I've seen other posts but most of them were really confusing and left wondering....

Thanks!


May we see what you have written until now?


~ Mansukh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help with constructing Java arrays