Question: Pseudocode of the program description by method Project Description Write an application that calculates the shipping charge for a package, based on its weight. The

Pseudocode of the program description by method

Project Description

Write an application that calculates the shipping charge for a package, based on its weight. The user will input the name of the client, a six digit identification code and weight in ounces. The shipping charge is calculated as $0.15 per ounce. Display the user's name, package id, weight in ounces and calculated shipping charge.

Input

Collect the identification code and the weight using a Scanner object. You must prompt the user for the Package Id on the console and then prompt the user for the weight in ounces on the console. Then ask the user for their name via a TextInputDialog dialog box.

Processing

Use appropriate Scanner method(s) so the input is assigned to appropriate variables. The package ID code needs not be calculated, so must be collected as text. The weight will be used in a calculation, and therefore must be assigned to an appropriate whole number variable. You will also retrieve the name from the TextInputDialog. You will calculate the charge by using the shipping rate of $0.15 per ounce

The shipping rate must be stored as a constant.

Output

Display the user's name, the package ID, the weight in ounces and the shipping charge each in separate labels with appropriate labeling information as the sample below shows. In order to display in labels you will have to create a GUI application with GridPane and Label objects. You will be using 8 Label objects - Four for the prompts and four the information

Name John Smith

Package ID 123456 Weight 17 oz. Shipping Cost 2.55

Step by Step Solution

3.46 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is a sample implementation of the program in Java using JavaFX for the GUI java import javafxapplicationApplication import javafxgeometryInsets i... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!