1. Engineering
  2. Computer Science
  3. write a boolean method named quothasaselfcountquot that returns true if...

Question: write a boolean method named quothasaselfcountquot that returns true if...

Question details

Write a boolean method named "hasASelfCount()" that returns true if at least one element in the array is a self count.35. Using your Java programming development skills and use of git, add a boolean method named hasASelfCount within the Lab02 class, with both a master and a development branch in your local git repository. Here is the function signature. You may assume the array elements are between 1 and 10 inclusive static boolean hasASelfCount (int numArray) purpose: return true if at least one element in the array is a self count (e.g. [2, 3, 2] is true (2 appears only twice) [S, 4, 2, 4, 3, 4, 4] is true (4 appears only four times [S, 2, 3, 4, 3] is false 8, 3, 2, 1] is true (1 appears only once) [2, 4, 2, 3, 2] is false [7, 2, 1, 3, 2, 4] is true (1 appears only once; 2 appears twice) parameter: numArray-an array containing any number of integers return: true if at least one element appears exactly that number of times in the array: else, false return false;

thanks

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution