Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8771707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:51:27+00:00 2026-06-13T17:51:27+00:00

For our programming assignment we have to ask the user for a Region Name

  • 0

For our programming assignment we have to ask the user for a Region Name and the statitics (integers) of that region we have to associate the integers with the Region Name and we have to be able to create multiple regions this is what I got so far lost as to what to do next Where I am confused is we have to call all the Regions the user has made Region A, Region B, Region C, then the user will select a Region from the list let’s say Region A then we must print the integers associated with Region A Example Region A contains integers {12,3,6,8]

            ArrayList<String> regions = new ArrayList<String>();

            System.out.print(" Enter Region to Add to List: ");
            regionName = keyb.nextLine();
            keyb.nextLine();
            regions.add(regionName);
            System.out.printf(" Enter Data for %s: " ,regionName);
            regionData = keyb.nextLine();
            String[] reg_Values = regionData.split(" ");
            double[] reg_DoubleValues = new double[reg_Values.length];
            double num;
            for (int i=0; i<reg_Values.length; i++)
            {
                num = Double.parseDouble( reg_Values[i] );
                reg_DoubleValues[i] = num;
                System.out.print(reg_DoubleValues[i]);

            }
            System.out.println();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T17:51:29+00:00Added an answer on June 13, 2026 at 5:51 pm

    It sounds like you need an Hashmap, or a key value pair collection.
    Providing that the regions are unique.

    HashMap<String, List<Integer>>
    

    Or

    HashMap<Region,List<Integer>>
    

    Or

    create a Region class, and have a composition of List<Integer>.

    Like so:

    public class Region
    {
      List<Integer> integers;
      String regionName;
      ....
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building programming contest software. A user's program is received by our judging
I have just started the Assembly language programming and in the first lecture our
Our application is a Java-GWT application that uses Guice-Persist and Guice-Servlet extensively. We have
As an assignment in operating systems we have to write our own code for
We have a new build machine to start using for our programming team. We
We were given an assignment in our C programming class to modify a program
Our company have a need to set up some solution, that would allow us
My professor told us that we could choose a programming language for our next
I am working on a programming assignment in which we are making our own
Im new to programming, in our c++ course, we have to build a stack

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.