Question: Write a java application for computing the sum average: creating an object of a class having an array. Array elements should be entered by the
Write a java application for computing the sum average: creating an object of a class having an array. Array elements should be entered by the user using the keyboard and the input will be taken until the user presses - 1. Your class should include sum function and average function Tips for the main function main() Declare an object Take input in the array of the object Print the sum of all the numbers of the array using the sum function of the object Print the average of all the numbers of the array using the average function of the object } Input 10 20 30 - 1 Output Sum = 60 Average - 20
Step by Step Solution
3.38 Rating (164 Votes )
There are 3 Steps involved in it
CODE import javaio class avg int dtnew int500 to store data max limit 500 public int sum to calculat... View full answer
Get step-by-step solutions from verified subject matter experts
