Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Array Program - Analysis

  1. #1
    Junior Member
    Join Date
    Mar 2021
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Array Program - Analysis

    Hello everyone,

    I'm having trouble accomplishing this task:
    A program that analyzes a set of numbers can be very useful. Create an Analysis application that prompts the user for numbers in the range 1 through 50, terminated by a sentinel, and then performs the following analysis on the numbers:

    • Determine the average number

    • Determine the maximum number

    • Determine the range (maximum-minimum)

    • Determine the mode (the number that occurs the most often)

    • Displays a bar graph called a histogram that shows the numbers in each five-unit range (1–5, 6–10, 11-15, etc.).

    My code so far is absolute garbage and I feel very lost. Can someone help me with this problem? I'm of course not asking you to solve this for me unless you want to :} but Please lead me in the right way. I have many tangled wires inside my head. Any help is very appreciated.

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Array Program - Analysis

    Do the project in steps.
    First design and write the code to read the numbers into an array. Get that to work before moving to the analysis part.
    Use something like this statement to print out the array for debugging:
      System.out.println("an ID "+ java.util.Arrays.toString(theArrayName));
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. jstat - Analysis
    By Ram Lakshmanan in forum Java Programming Tutorials
    Replies: 0
    Last Post: November 28th, 2019, 02:26 AM
  2. GC Log analysis compliments APM
    By Ram Lakshmanan in forum Java Programming Tutorials
    Replies: 0
    Last Post: November 28th, 2018, 05:01 AM
  3. Regular Expression for log analysis
    By ankita shukla in forum What's Wrong With My Code?
    Replies: 0
    Last Post: December 20th, 2017, 02:13 PM
  4. I need some analysis on a project.
    By Rain_Maker in forum Java Theory & Questions
    Replies: 1
    Last Post: February 17th, 2013, 10:27 PM
  5. Big O - Algorithm Analysis
    By PeskyToaster in forum Java Theory & Questions
    Replies: 4
    Last Post: March 15th, 2012, 11:48 PM