Question
Write a java program that: - - reads the weight of 5 boxes as double number from the user the box weight should not
Write a java program that: - - reads the weight of 5 boxes as double number from the user the box weight should not exceed 25.0 kg, otherwise a message is given to re-enter weight calculate the average weight - print the average weight Output Sample: Sample 1 Box#1 weight = 12.5 Box#2 weight = 22.7 Box#3 weight = 17.2 Box#4 weight = 10.4 Box#5 weight = 9.5 Boxes average weight is: 14.46 kg Sample 2 Box#1 weight = 10.9 Box#2 weight = 21 Box#3 weight = 11.8 Box#4 weight = 25.9 Weight should not exceed 25 Box#4 weight = 25 H Box#5 weight = 19.5 Boxes average weight is: 17.64 kg Sample 3 Box#1 weight = 27 Weight should not exceed 25 Box#1 weight = 17 Box#2 weight = 22 Box#3 weight = 13.8 Box#4 weight = 5.5 Box#5 weight = 7.6 Boxes average weight is: 13.18 kg
Step 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 StartedRecommended Textbook for
Java An Introduction To Problem Solving And Programming
Authors: Walter Savitch
8th Edition
0134462033, 978-0134462035
Students also viewed these Databases questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App