Develop the algorithms The challenge in the project is developing algorithms that accomplishes basic operations over an array of integer numbers. The three operations are: Find the minimum (smallest) value that appears in the array Find the maximum (largest) value that appears in the array Determine the number of unique values that appear in the array Develop an algorithm for each of those tasks. The algorithms should work for any size of array. If the array is empty (i.e., doesn't include any elements/values) the algorithm should output a zero. Keep in mind that like any computational problem there are several approaches to achieve a solution. For this programming checkpoint your will need to utilize loops and conditional statements. Write the pseudocode or flowchart for the algorithm and store it in a file (file format can be text, pdf or doc) with the name arrayUtilSteps. Part B - Implement the class The goal for this part is to implement a class with the algorithms developed in Part A. Create a class with the following requirements: Class name is ArrayUtil Has an integer array field named intArray A default constructor A constructor that accepts one argument for the array field and assigns that argument to the appropriate field. You may assume that only valid values will be used to test the constructor (i.e., you don't have to worry about input validation). An accessor for the field. A mutator for the field. A method called minValue that does not accept any arguments and finds the minimum (smallest) value in the integer array and returns that value. A method called maxValue that does not accept any arguments and finds the maximum (largest) value in the integer array and returns that value. A method called countUniqueIntegers that does not accept any arguments and determines the number of unique values that appear in the array and returns that value. (i.e., count of the number of unique groups of integer values in an array). For example, given this array of integers {1,2,2,4,3,5,4,3,8,10} we have 7 unique groups of values 1, 2, 3, 4 ,5, 8, 10. NOTE: Remember to follow the Java naming conventions and the rules for encapsulation. NOTE 2: You must use simple arrays and conditionals and not any helper classes or packages. Keep in mind that the algorithms for each of the methods should work for any size of array. If the array is empty (i.e., doesn't include any elements/values) they should return zero
Develop the algorithms The challenge in the project is developing algorithms that accomplishes basic operations over an array of integer numbers. The three operations are: Find the minimum (smallest) value that appears in the array Find the maximum (largest) value that appears in the array Determine the number of unique values that appear in the array Develop an algorithm for each of those tasks. The algorithms should work for any size of array. If the array is empty (i.e., doesn't include any elements/values) the algorithm should output a zero. Keep in mind that like any computational problem there are several approaches to achieve a solution. For this programming checkpoint your will need to utilize loops and conditional statements. Write the pseudocode or flowchart for the algorithm and store it in a file (file format can be text, pdf or doc) with the name arrayUtilSteps. Part B - Implement the class The goal for this part is to implement a class with the algorithms developed in Part A. Create a class with the following requirements: Class name is ArrayUtil Has an integer array field named intArray A default constructor A constructor that accepts one argument for the array field and assigns that argument to the appropriate field. You may assume that only valid values will be used to test the constructor (i.e., you don't have to worry about input validation). An accessor for the field. A mutator for the field. A method called minValue that does not accept any arguments and finds the minimum (smallest) value in the integer array and returns that value. A method called maxValue that does not accept any arguments and finds the maximum (largest) value in the integer array and returns that value. A method called countUniqueIntegers that does not accept any arguments and determines the number of unique values that appear in the array and returns that value. (i.e., count of the number of unique groups of integer values in an array). For example, given this array of integers {1,2,2,4,3,5,4,3,8,10} we have 7 unique groups of values 1, 2, 3, 4 ,5, 8, 10. NOTE: Remember to follow the Java naming conventions and the rules for encapsulation. NOTE 2: You must use simple arrays and conditionals and not any helper classes or packages. Keep in mind that the algorithms for each of the methods should work for any size of array. If the array is empty (i.e., doesn't include any elements/values) they should return zero
Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 12PE
Related questions
Question
Part A – Develop the algorithms
The challenge in the project is developing algorithms that accomplishes basic operations over an array of integer numbers.
The three operations are:
Find the minimum (smallest) value that appears in the array
Find the maximum (largest) value that appears in the array
Determine the number of unique values that appear in the array
Develop an algorithm for each of those tasks. The algorithms should work for any size of array. If the array is empty (i.e., doesn't include any elements/values) the algorithm should output a zero.
Keep in mind that like any computational problem there are several approaches to achieve a solution. For this programming checkpoint your will need to utilize loops and conditional statements.
Write the pseudocode or flowchart for the algorithm and store it in a file (file format can be text, pdf or doc) with the name arrayUtilSteps.
Part B - Implement the class
The goal for this part is to implement a class with the algorithms developed in Part A.
Create a class with the following requirements:
Class name is ArrayUtil
Has an integer array field named intArray
A default constructor
A constructor that accepts one argument for the array field and assigns that argument to the appropriate field. You may assume that only valid values will be used to test the constructor (i.e., you don't have to worry about input validation).
An accessor for the field.
A mutator for the field.
A method called minValue that does not accept any arguments and finds the minimum (smallest) value in the integer array and returns that value.
A method called maxValue that does not accept any arguments and finds the maximum (largest) value in the integer array and returns that value.
A method called countUniqueIntegers that does not accept any arguments and determines the number of unique values that appear in the array and returns that value. (i.e., count of the number of unique groups of integer values in an array). For example, given this array of integers {1,2,2,4,3,5,4,3,8,10} we have 7 unique groups of values 1, 2, 3, 4 ,5, 8, 10.
NOTE: Remember to follow the Java naming conventions and the rules for encapsulation.
NOTE 2: You must use simple arrays and conditionals and not any helper classes or packages.
Keep in mind that the algorithms for each of the methods should work for any size of array. If the array is empty (i.e., doesn't include any elements/values) they should return zero.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage