In Java code
Exercise #1: (Java) Design and implement a program (name it MinMaxAvg) that defines three methods as follows:
Method max (int x, int y, int z) returns the maximum value of three integer values.
Method min (int X, int y, int z) returns the minimum value of three integer values.
Method average (int x, int y, int z) returns the average of three integer values.
In the main method, test all three methods with different input value read from the user. Document your code and properly label the input prompts and the outputs as shown below.
Sample run 1:
You entered: 20, 8, 12
Max value: 20
Min value: 8
Average value: 13
Sample run 2:
You entered: 1, 2, 3
Max value: 3
Min value: 1
Average value: 2
Sample run 3:
You entered: 10, 5, 25
Max value: 25
Min value: 5
Average value: 13
import java.util.Scanner;
public class MinMaxAvg {
static int min(int x, int y, int z)
{
int value = x;
if (y < value)
{
value = y;
}
if (z < value)
{
value = z;
}
return value;
}
static int max(int x, int y, int z)
{
int value = x;
if (y > value)
{
value = y;
}
if (z > value)
{
value = z;
}
return value;
}
static int average(int x, int y, int z)
{
return (x + y + z) / 3;
}
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("Enter first number: ");
int n1 = in.nextInt();
System.out.print("Enter second number: ");
int n2 = in.nextInt();
System.out.print("Enter third number: ");
int n3 = in.nextInt();
System.out.println("You entered: " + n1 + ", " + n2 + ", " + n3);
System.out.println("Max value: " + max(n1, n2, n3));
System.out.println("Min value: " + min(n1, n2, n3));
System.out.println("Average value: " + average(n1, n2, n3));
in.close();
}
}

In Java code Exercise #1: (Java) Design and implement a program (name it MinMaxAvg) that defines...
I need this in JAVA please: Design and implement a program (name it MinMaxAvg) that defines three methods as follows: Method max (int x, int y, int z) returns the maximum value of three integer values. Method min (int X, int y, int z) returns the minimum value of three integer values. Method average (int x, int y, int z) returns the average of three integer values. In the main method, test all three methods with different input value read...
In Java Exercise #2: (Java) Design and implement a program (name it ComputeAreas) that defines four methods as follows: Method squareArea (double side) returns the area of a square. Method rectangleArea (double width, double length) returns the area of a rectangle. Method circleArea (double radius) returns the area of a circle. Method triangleArea (double base, double height) returns the area of a triangle. In the main method, test all methods with different input value read from the user. Document your...
Design in Python (pseudocode) and implement (source code) a program (name it MyRectangle) that defines the following 3 methods: Method isValid() returns true if the sum of the width and height is greater than 30 Method Area() returns the area of the rectangle if it is a valid rectangle Method Perimeter() returns the perimeter of the rectangle if it is a valid rectangle The main method of MyRectangle prompts the user to enter the width and height of a rectangle...
Design Java (source code) a program (name it IndexOfLargest) to find the index of the first largest value in the array. Note that the largest value may appear more than once in the array. The program main method defines a single-dimensional array of size 10 elements and prompts the user to enter 10 integers to initialize the array. The main method then calls method findIndex() that takes a single-dimensional array of integer values and return the index of the first...
C++ Design and implement a program (name it PalindromeInteger), to check if an integer value is a palindrome or not, using 2 methods (reverse and isPalindrome) specified as follows: Method reverse(int number) takes integer number and returns number in reverse order. The method mathematically reverses the number. Method isPalindrome(int number) takes integer number and returns true if the number is palindrome; false otherwise. Use method reverse() to implement method isPalindrome(). Notice that an integer value is palindrome if the value...
Please do in Java as simply as possible :) Exercise #3: Design and implement a program (name it ArrayMethods), that defines 4 methods as follows: int arrayMax(int[] arr) returns the maximum value in the an array int arrayMin(int[] arr) returns the minimum value in an array void arraySquared(int[] arr) changes every value in the array to its square (value²) void arrayReverse(int[] arr) reverses the array (for example: array storing 7 8 9 becomes 9 8 7 ) The program main...
IN PYTHON ONLY !! Design (pseudocode) and implement (source code) a program (name it Occurrences) to determine whether two two-dimensional arrays are equivalent or not. Two arrays are equivalent if they contain the same values in any order. The program main method defines two two-dimensional array of size 3-by-3 of type integer, and prompts the user to enter integer values to initialize the arrays. - The main method calls method isEquivalent()that takes two two-dimensional arrays of integer and returns true...
Exercise 5: Design and implement a Java program (name it ArrayMethods), that defines 4 methods as follows: int arrayMax(int[] arr) determines and returns the largest value within an array int arrayMin(int[] arr) determines and returns the smallest value within an array void arrayReverse(int[] arr) reverses the array (for example: 7 8 1 2 becomes 2 1 8 7) void arraySquared(int[] arr) changes every value within the array to value² Test your methods by creating an array of length 5 within...
Design and implement a Java program (name it ArrayMethods), that defines 4 methods as follows: int arrayMax (int [ ] arr) determines and returns the maximum value within an array int arrayMin (int [ ] arr) determines and returns the minimum value within an array void arraySquared (int [] arr) changes every value within the array to value2 void arrayReverse (int [ ] arr) reverses the array (for example: 7 8 12 becomes 2 18 7) Test your methods by...
Design and implement a Java program (name it ArrayMethods ), that defines 4 methods as follows: int arrayMax (int [ ] arr) determines and returns the ma ximum value within an array int arrayMin (int [ ] arr) determines and returns the minimum value within an array void arraySquared (int [ ] arr) changes every value within the array to value