Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.need to complete this part of code.(part-1) 2. this is the rest of it which is completed 35. Using your Java programming development skills and

1.need to complete this part of code.(part-1) image text in transcribed
2. this is the rest of it which is completed
image text in transcribed
35. Using your Java programming development skills and use of git, add a boolean method named hasSelfCount within the Labo2 class, with both a master and a development branch in your local git repository. (hasAselfCount method should be in the development branch, but not in the master branch) Here is the function signature. You may assume the array elements are between 1 and 10 inclusive. static boolean hasSelfCount(int (1 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) [5, 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; } Start Page Son History Labo2.java 4 author 5 6 public class Lab02 90 10 11 12 13 public static int calcumEven (int[] numArray) int sum 0: for (int : numArray) if (sum2-0) sum + 1:) return sum; 15 16 e 17 18 19 20 21 22 23 24 25 26 27 22 29 30 public static int calcSum (int[] numArray) { int total = 0; for (int a : numarray) total + a:) return total; Blend calcSum public static void main(String[] args) { int[] myflumlist = (3, 4, 5, 2, 1, 6): System.out.println("The cray 1"): for (int a myumlist) System.out.print("3d", a); 1 System.out.println(): end main int 22 33 1/fend clase Lab Output Git - Labo2-master Labo2 [master Git Repository Browser X

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago