Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound. 1. Declare a constant named CENTS PER

image text in transcribed
The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound. 1. Declare a constant named CENTS PER POUND and initialize with 25 2. Get the shipping weight from user input storing the weight into shipWeightPounds. 3, Using FLAT FEE CENTS and CENTS PER POUND constants, assign shipCostCents with the cost of shipping a package weighing shipWeightPounds 1 import java.util.Scanner; 3 public class ShippingCalculator 4 public static void main (String [1 args) t Scanner scnr new Scanner (System.in) int shipweightPounds; int shipCostCents 0; final int FLAT-FEE-CENTS-75; 10 Your solution goes here/ 12 13 14 15 16 ) 17 System.out.printin("ieight (b)shipheightpounds)i System.out.printin("Flat fee(cents):FLAT FEE CENTS); System.out.printin("Cents per pound: CENTS PER POUND); System.out.printin( Shipping cost(cents)shipCostCents)

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions