7.2 Quiz Instructions

Write a program that determines how many elements from an array of integers fall between a specified minimum (inclusive) and maximum (exclusive).

Your program will include a method named countInRange with the following parameters:

  • array of integers to search
  • minimum (integer, inclusive)
  • maximum (integer, exclusive)

...and return the count (integer) of elements in the array that are within the indicated range (inclusive).

For test cases, use the following. Create two separate arrays and call the countInRange method for each. Print the result for each on the console using the exact output specified by ArrayRangeQuizOutput.txt.

Array Min Max Return
14, 1, 22, 17, 36, 7, -43, 5 4 17 3
7, -1, 12, -3, 0, 9, -5, -7, 4, 2 -4 7 5

Name your class "<your name>_ArrayRangeQuiz" and submit the source code to me via DropItToMe

The program must produce the exact output found in: (make sure you use the output comparision tool!)

Quiz Grading

The quiz is worth 35 points.

This is pretty simple...you get 100% if your output exactly matches the expected output...and...0% if it has ANY differences.

Make sure you get all the spelling, capitalization, punctuation, spacing, etc. correct! Hint: copy-n-paste is a wonderful thing! :)