Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Straight Talk Bar and Grill has commissioned you to write a program to keep track of its daily sales. The people at the Straight

image text in transcribed
The Straight Talk Bar and Grill has commissioned you to write a program to keep track of its daily sales. The people at the Straight Talk wish you to set up the program so that it prompts Laurie McCool, the manager, for the total sales for a day, and reads in her reply. Now, the Straight Talk does not necessarily check its sales once a week Laurie McCool will be running the program at random intervals. This mcans that you can't count her entering sales for exactly six days. Therefore your program should incorporate a loop which will continue to prompt Laurie McCool for a day's total sales until she enters the number 9999. This number will be Lauric's Seotinel Signal that she is done entering the data. Be sure that your program DOESN'T INTERPRET that number as the total sales for a day! After reading in all the data, your program should print out the following information 1) The number of days for which data was entered. 2) The grand total for all the sales entered. 3) The average for all the sales entered. 4) The best (maximum) sale and the day on which it occurred 5) The worst (minimum) sale and the day on which it occurred. There are several things that your program should watch out for. FIRST OF ALL, Laurie McCool often partakes of the product she sells and her typing can be erratic. The total sales for a day will always be a positive real number and if your program reads in a negative aumber, it should let her kuow that it is invalid and prompt for more data. Be sure that no negative numbers are used in your program's computation of the grand total, the average, etc... Also the counter for Dumber of days should not be incremented when negative numbers are entered Laurie also occasionally begins to run the program and then changes her mind. In such an instance she types immediately 9999 in repl to tbe first prompt. Your program should handle this event without ABNORMALLY TERMINATING. Be sure that if the grand total, verage, etc Laurie sometimes forgets how the program works, so your output should begin with a brief description of the program. Make sure that your prompts are clear. DON T FORGET to tell Laurie how to stop the program. All the results should be carefully explained. DO NOT USE SCIENTIFIC NOTATION-- LAURIE JUST CAN'THANDLE IT! The Straight Talk Bar and Grill has commissioned you to write a program to keep track of its daily sales. The people at the Straight Talk wish you to set up the program so that it prompts Laurie McCool, the manager, for the total sales for a day, and reads in her reply. Now, the Straight Talk does not necessarily check its sales once a week Laurie McCool will be running the program at random intervals. This mcans that you can't count her entering sales for exactly six days. Therefore your program should incorporate a loop which will continue to prompt Laurie McCool for a day's total sales until she enters the number 9999. This number will be Lauric's Seotinel Signal that she is done entering the data. Be sure that your program DOESN'T INTERPRET that number as the total sales for a day! After reading in all the data, your program should print out the following information 1) The number of days for which data was entered. 2) The grand total for all the sales entered. 3) The average for all the sales entered. 4) The best (maximum) sale and the day on which it occurred 5) The worst (minimum) sale and the day on which it occurred. There are several things that your program should watch out for. FIRST OF ALL, Laurie McCool often partakes of the product she sells and her typing can be erratic. The total sales for a day will always be a positive real number and if your program reads in a negative aumber, it should let her kuow that it is invalid and prompt for more data. Be sure that no negative numbers are used in your program's computation of the grand total, the average, etc... Also the counter for Dumber of days should not be incremented when negative numbers are entered Laurie also occasionally begins to run the program and then changes her mind. In such an instance she types immediately 9999 in repl to tbe first prompt. Your program should handle this event without ABNORMALLY TERMINATING. Be sure that if the grand total, verage, etc Laurie sometimes forgets how the program works, so your output should begin with a brief description of the program. Make sure that your prompts are clear. DON T FORGET to tell Laurie how to stop the program. All the results should be carefully explained. DO NOT USE SCIENTIFIC NOTATION-- LAURIE JUST CAN'THANDLE IT

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions

Question

Explain the functions of financial management.

Answered: 1 week ago

Question

HOW MANY TOTAL WORLD WAR?

Answered: 1 week ago

Question

Discuss the scope of financial management.

Answered: 1 week ago

Question

Discuss the goals of financial management.

Answered: 1 week ago