1. A shipping company charges the rates listed in the following table: Shipping Rate per Mile Weight of package in kg 2 kg or less $0.01 $0.015 $0.02 $0.025 Over 2 kg, but not more than 6 kg Over 6 kg, but not more than 10 kg Over 10 kg, but not more than 20 kg Create an application that allows the user to enter the weight of the package and the distance it is to be shipped, and then displays the charges in a label. Ensure that the user has entered valid numbers. Do not accept values of 0 or less for the weight of the package. Do not accept weights of more than 20 kg (this is the maximum weight the company will ship). Do not accept distances of less than 10 miles or more than 3000 miles. These are the company's minimum and maximum shipping distances. Suggestion: Use the || operator to combine the two range conditions that check for package weights that are too small or too large. I suggest you go about this problem by first making sure everything is valid. And if everything is valid, do what the application asks you to do. Test with the following data: Weight and Distance 1.5 kg, 100 miles 5 kg, 200 miles 8kg, 750 miles 15 kg, 2000 miles Also test your validation Shipping Cost $ 1.00 $ 3.00 $ 15.00 $ 50.00
1. A shipping company charges the rates listed in the following table: Shipping Rate per Mile Weight of package in kg 2 kg or less $0.01 $0.015 $0.02 $0.025 Over 2 kg, but not more than 6 kg Over 6 kg, but not more than 10 kg Over 10 kg, but not more than 20 kg Create an application that allows the user to enter the weight of the package and the distance it is to be shipped, and then displays the charges in a label. Ensure that the user has entered valid numbers. Do not accept values of 0 or less for the weight of the package. Do not accept weights of more than 20 kg (this is the maximum weight the company will ship). Do not accept distances of less than 10 miles or more than 3000 miles. These are the company's minimum and maximum shipping distances. Suggestion: Use the || operator to combine the two range conditions that check for package weights that are too small or too large. I suggest you go about this problem by first making sure everything is valid. And if everything is valid, do what the application asks you to do. Test with the following data: Weight and Distance 1.5 kg, 100 miles 5 kg, 200 miles 8kg, 750 miles 15 kg, 2000 miles Also test your validation Shipping Cost $ 1.00 $ 3.00 $ 15.00 $ 50.00
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
c# code with forms

Transcribed Image Text:1. A shipping company charges the rates listed in the following table:
Weight of package in kg
2 kg or less
Over 2 kg, but not more than 6 kg
Over 6 kg, but not more than 10 kg
Over 10 kg, but not more than 20 kg
Shipping Rate per Mile
$0.01
$0.015
$0.02
$0.025
Create an application that allows the user to enter the weight of the package and the distance it
is to be shipped, and then displays the charges in a label. Ensure that the user has entered valid
numbers. Do not accept values of 0 or less for the weight of the package. Do not accept weights
of more than 20 kg (this is the maximum weight the company will ship). Do not accept
distances of less than 10 miles or more than 3000 miles. These are the company's minimum and
maximum shipping distances. Suggestion: Use the || operator to combine the two range
conditions that check for package weights that are too small or too large. I suggest you go about
this problem by first making sure everything is valid. And if everything is valid, do what the
application asks you to do.
Test with the following data:
Weight and Distance
1.5 kg, 100 miles
5 kg, 200 miles
8kg, 750 miles
15 kg, 2000 miles
Also test your validation
Shipping Cost
$ 1.00
$ 3.00
$ 15.00
$
50.00
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education