I work the check-in desk and I say the same sentence fourhundred times a shift. Bags over fifty pounds cost seventy-fivedollars extra. Let me type the weight in and have the screensay it, and tell them how far over they are so they can movesomething into their carry-on.Write your requirements list before you write any code. Input, calculate, output, and anything you had to decide for yourself.
if with one else. It does not need a chain.Only one-star challenges have this section. If you already know how to begin, skip it — and when you move up to two stars, working out the order yourself is part of the job.
double.Parse.if for the overweight case first.else for everything else, then test a bag on each side of the limit.Bag weight (lbs): 56
Overweight by 6.0 lbs. Fee: $75A 41-pound bag should say it is within the limit and mention no fee. Test 49, 50, and 51 before you submit — those three are where a boundary mistake shows up.
Your requirements list and your program file, named cc-bag-fee.