Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a C# program that calculates the cost to ship a package using the Rich ex delivery system. Your program should prompt the user to
Write a C# program that calculates the cost to ship a package using the Rich ex delivery system. Your program should prompt the user to input the weight in kg (use the variable double packageWeight). There is a flat charge of $1.50 on every package plus an additional charge based on weight: if the weight of the package is less than 1.0 kg, the cost per kg is $2.00. If the weight is greater than or equal to 1.0 kg but less than 3.5 kg, the cost per kg is $2.50, Finally, if the weight of the package is greater than or equal to 3.5 kg, the cost per kg is $3.00. Once the cost has been determined, you need to output the result in a nice fashion with a Console.WriteLine() statement. Finally, be sure to validate that the input weight is greater than Okg and less than or equal to 100kg, and use constants if applicable. The structure of your program should look like the following: using System; public static class RichEx { public static void Maino
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started