Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4.5 People's weights (Java) 1) Prompt the user to enterve numbers, being ve people's weights. Store the numbers in an array 01' doubles. Output the

image text in transcribedimage text in transcribed
4.5 People's weights (Java) 1) Prompt the user to enterve numbers, being ve people's weights. Store the numbers in an array 01' doubles. Output the array's numbers on one line, each number followed by one space. (2 pts) Ex: Enter weight 1: 236 Enter weight 2: 89.5 Enter weight 3: 142 Enter weight 4: 166.3 Enter weight 5: 93 You entered: 236.0 89.5 142.0 166.3 93.0 2) Also output the total weight, by summing the array's elements. [1 pt) 3) Also output the average of the array's elements. ('1 pt) 4) Also output the max array element. [2 pts) Ex: Enter weight 1: 236 Enter weight 2: 89.5 Enter weight 3: 142 Enter weight 4: 166.3 Enter weight 5: 93 You entered: 236.0 89.5 142.0 166.3 93.0 Total weight : 726.8 Average weight: 145 . 35999999999999 Max weight : 236.0 440066.2818008.qx3zqy7 LAB ACTIVITY 4.5.1: People's weights (Java) 0 / 6 PeopleWeights.java Load default template... import java. util . Scanner; NP public class Peopleweights { UTA W public static void main(String args) { /* Type your code here. */ 6 return; 8

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

1. How does The Body Shop engage in direct marketing?

Answered: 1 week ago