Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

p please write a code for Java. with using 'if else'. thank you Write a program that asks for the weight of a package in

image text in transcribedp please write a code for Java. with using 'if else'. thank you

Write a program that asks for the weight of a package in pounds determines the number of boxes needed to pack the items. Assume that a box can hold a maximum of 3 pounds. For now, assume that the package weight is an integer. Here is 2 sample executions: green font is the user input We package 3 pounds in a box. Tell me how many pounds do you have, and I will tell you how many boxes you need Enter the total weight in pounds: 17 You need 6 Boxes Use named constants, do NOT use literals! We package 3 pounds in a box. Tell me how many pounds do you have, and I will tell you how many boxes you need Enter the total weight in pounds: 0 You need 1 Boxes 39

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

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions