• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help with constructing Java arrays

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 1164
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?
 
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic