Question: JAVA! Refer to the above example of Inner Class, create, compile and run a Java program that calculates the average, minimum and maximum age of

JAVA!

  1. Refer to the above example of Inner Class, create, compile and run a Java program that calculates the average, minimum and maximum age of your friends and family members. The program should include nested class/inner class, appropriate variables, types and methods.

JAVA! Refer to the above example of Inner Class, create, compile and

// Use an inner class. class Outer { int nums [] ; Outer(int n[]) { nums = n; } void analyze () { Inner inob = new Inner(); 11 11 System.out.println("Minimum: System.out.println("Maximum: System.out.println("Average: + inob.min()); + inob.max()); + inob.avg()); 11 } // This is an inner class. class Inner { An inner class int min() { int m = nums [0]; for(int i=1; i m) m = nums (i); return m; } int avg() { int a = 0; for(int i=0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!