Question
need this for a JAVA homework 1 a) Write the static method countLessThan. The method has two parameters, an array of integer and an integer
need this for a JAVA homework
1 a) Write the static method countLessThan. The method has two parameters, an array of integer and an integer value. The method is to count and return the number of times that the values in the array are less than the integer parameter value. Assume that the array is filled.
b) Write the code to create an array of 8 integers with the values (1, 5, 7, 2, 5, 2, 5, 3). Then demonstrate how the method countLessThan can be used to determine the number of values less than 4. You can demonstrate this by printing out the result of calling the method.
2)
3)
4)
Consider the UML class diagram and the code below. You are to draw the memory where specified. Person name String age int Person (String,int toString tring public class Question. static void main String CI args) Person john new person. John 23 w the memory for john drat Person people new person. [3] F draw the memory for people at this point people [01 new Person ("Tom", 34) Reeple [11 new Person Bill 19 Reeple, [2 people [1] draw the updated memory for peopleStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started