#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    Mutli-Dimensional Arrays


    Write a class (and a client class to test it) that encapsulates the evolution of the sales tax rates in the 50 U.S states over the last 10 years. Your only instance variable should be a two-dimensional array of values representing the sales tax rates. Dimension 1 represents the state and dimension2 represents the year. Your constructor can simply be a default constructor, randomly generating the sales tax rates, which should be between 0 and 0.06. You should include the following methods:

    a. A method returning the index of the state that has the biggest average tax rate over the years.

    b. A method returning an array of indexes of the states that have had at least one year with a tax rate less than 0.001

    c. A method returning the highest sales tax rate over the years for a given state (which will be a parameter)

    this was the question. please help. how can I solve it?
  2. #2
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,711
    Rep Power
    347
    Do you have any specific questions about your assignment?
    Please post your code and any questions about problems you are having.

IMN logo majestic logo threadwatch logo seochat tools logo