Bob LazyBones. Write a program that prompts the user to enter in his or her age. IF-- the person is...

7
Bob LazyBones

Transcript of Bob LazyBones. Write a program that prompts the user to enter in his or her age. IF-- the person is...

Page 1: Bob LazyBones. Write a program that prompts the user to enter in his or her age. IF-- the person is over 21, display the message; “Time for you to get.

Bob LazyBones

Page 2: Bob LazyBones. Write a program that prompts the user to enter in his or her age. IF-- the person is over 21, display the message; “Time for you to get.

Bob LazyBonesWrite a program that prompts the user to enter in his or her age. IF--the person is over 21 , display the message;“Time for you to get a job!”ELSE--display the message;“Youth is a wonderful thing!...Enjoy it!”

Page 3: Bob LazyBones. Write a program that prompts the user to enter in his or her age. IF-- the person is over 21, display the message; “Time for you to get.

Bob LazyBonesYour friend Bob Lazybones finally got a job! He has asked us to add to his program to remind him to go to work. IF--It’s not Saturday or Sunday. Otherwise--Display the message;“No work today! Yeah!!!

Page 4: Bob LazyBones. Write a program that prompts the user to enter in his or her age. IF-- the person is over 21, display the message; “Time for you to get.

Bob LazyBonesYour friend Bob Lazybones got a job selling cars for Slick Guys Used Car. They pay their sales people a commission based on the value of the sale. If the sale was made:1) At or above sticker price, the commission is 20%. 2) Less than sticker price, but greater than blue book, the commission is 10%. 3) Equal to blue book, the commission is 5%. 4) Slick Guys never sells less than blue book.

Page 5: Bob LazyBones. Write a program that prompts the user to enter in his or her age. IF-- the person is over 21, display the message; “Time for you to get.

1. The sales price is GREATER than or EQUAL to the sticker price.

2. The sales price is LESS than the sticker price but GREATER than the blue book price.

3. The sales price EQUALS the blue book price.

4. The sales price cannot be less than blue book

What do you do for each situation?

>= sticker price = 20%

> blue book = 10%

= blue book = 5%

< blue book = no sale

Page 6: Bob LazyBones. Write a program that prompts the user to enter in his or her age. IF-- the person is over 21, display the message; “Time for you to get.

Bob LazyBonesYour friend Bob Lazybones gets a bonus depending on what options package he includes with each sale of a car.Bob receives the following bonus’.1) $500 for the Sports Package. 2) $1000 for the Limited Package. 3) $2000 for the Maintenance Package. 4) $0 if no options package was included.

Page 7: Bob LazyBones. Write a program that prompts the user to enter in his or her age. IF-- the person is over 21, display the message; “Time for you to get.

Sample OutputCONSOLE DISPLAYS TEST VALUE ENTEREDHow old are you, Bob? 24Bob, time for you to get a job!What day of the week is it, Bob? TuesdayBob, you need to go to work today!What was the Sales Price of the car you sold today? 5500.00What was the Sticker Price of the car you sold today? 4500.00What is the Blue Book for the car you sold today? 4000.00Which Options Package did the car have?

Enter ‘A’ for the Sports Package ‘B’ for the Limited Package

‘C’ for the Maintenance Package ‘D’ for No Options Package BBob, you must be glad that you went to work today.You earned a Base Commission of $1,100.00 today!You also earned an Options Bonus of $1,000 today!That is total earnings of $2,100 today. Great job!