Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Please help with this JAVA code Question: Write a java program that: reads the weight of 5 boxes as double number from the user -

Please help with this JAVA code
image text in transcribed
Question: Write a java program that: reads the weight of 5 boxes as double number from the user - the box weight should not exceed 25.0kg, otherwise a message is given to re-enter weight - calculate the average weight print the average weight Output Sample: \begin{tabular}{|l|l|l|} \hline Sample 1 & Sample 2 & Sample 3 \\ BoxH1 weight =12.5 & BoxH1 weight =10.9 & BoxH1 weight =27 \\ BoxH2 weight =22.7 & BoxH2 weight =21 & Weight should not exceed 25 \\ BoxH3 weight =17.2 & BoxH3 weight =11.8 & BoxH1 weight =17 \\ BoxH4 weight =10.4 & Box\#4 weight =25.9 & BoxH2 weight = 22 \\ BoxH5 weight =9.5 & Weight should not exceed 25 & BoxA3 weight =13.8 \\ Boxes average weight is: & BoxH4 weight =25 & BoxtA weight =5.5 \\ 14.46kg & Box\#5 weight =19.5 & BoxH5 weight =7.6 \\ & Boxes average weight is: & Boxes average weight is: \\ & 17.64kg & 13.18kg \\ \hline \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions