Using the previous workshop, solve these problems by using the pseudocode only not javascript code In the
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In the Programmer's Workshop, you study a business problem and develop an Algorithm for a solution as a programmer would approach it. For this problem, you use pseudocode as the programming tool. In future modules, you use other tools, including flowcharts and JavaScript. These problems help you put together what you've learned in the module, paying special attention to good programming style. Problem: Sunshine Books is a bookstore that's open every morning from 8:00 am to 12:00 pm. The manager wants information about the number of customers in the store at different times. A clerk, whose station is near the door, counts customers by making a mark on a piece of paper each time a customer enters. The paper is divided into four segments, one for each hour, and the clerk notes the time before making each mark. When the store closes at noon, the clerk wants to enter the numbers in the program, which then displays the total number of customers for the day and the average number of customers per hour. Your job, as the programmer, is to develop an algorithm by using pseudocode. If the manager likes your pseudocode proposal, you might be invited back to write the program in an actual computer language. Discussion: Use the IPO method to get started: What outputs are requested? Total Customers and average customers per hour What inputs are available? Number of customers for each hour What processing is required? Get input, add numbers for total, and divide by number of hours for average The next step is deciding what variables and constants you need. You need a variable for each item you want to keep track of (that is, each input and output) and sometimes a temporary variable for calculations. You should use a constant when you know ahead of time how many of something you have. Choose your variables and constants, giving them the following names and data types: Total Customers (numeric): totCust Average customers per hour (numeric): avgCust Count of customers each hour (numeric): count1, count2, count3, count4 Number of hours (numeric constant): NUM_HOURS 1. Open a new file in Notepad and save it as customerStats.txt 2. Start by entering your four documentation items, substituting your name for the author name and today's date for the date last modified: // Program Name: Customer Statistics //Purpose: Compute total and average number of customers over 4 hours // Author: Adrian Tillman // Date Last Modified: 01-13-2018 In the Programmer's Workshop, you study a business problem and develop an Algorithm for a solution as a programmer would approach it. For this problem, you use pseudocode as the programming tool. In future modules, you use other tools, including flowcharts and JavaScript. These problems help you put together what you've learned in the module, paying special attention to good programming style. Problem: Sunshine Books is a bookstore that's open every morning from 8:00 am to 12:00 pm. The manager wants information about the number of customers in the store at different times. A clerk, whose station is near the door, counts customers by making a mark on a piece of paper each time a customer enters. The paper is divided into four segments, one for each hour, and the clerk notes the time before making each mark. When the store closes at noon, the clerk wants to enter the numbers in the program, which then displays the total number of customers for the day and the average number of customers per hour. Your job, as the programmer, is to develop an algorithm by using pseudocode. If the manager likes your pseudocode proposal, you might be invited back to write the program in an actual computer language. Discussion: Use the IPO method to get started: What outputs are requested? Total Customers and average customers per hour What inputs are available? Number of customers for each hour What processing is required? Get input, add numbers for total, and divide by number of hours for average The next step is deciding what variables and constants you need. You need a variable for each item you want to keep track of (that is, each input and output) and sometimes a temporary variable for calculations. You should use a constant when you know ahead of time how many of something you have. Choose your variables and constants, giving them the following names and data types: Total Customers (numeric): totCust Average customers per hour (numeric): avgCust Count of customers each hour (numeric): count1, count2, count3, count4 Number of hours (numeric constant): NUM_HOURS 1. Open a new file in Notepad and save it as customerStats.txt 2. Start by entering your four documentation items, substituting your name for the author name and today's date for the date last modified: // Program Name: Customer Statistics //Purpose: Compute total and average number of customers over 4 hours // Author: Adrian Tillman // Date Last Modified: 01-13-2018
Expert Answer:
Answer rating: 100% (QA)
Program Name Recyclying Calculator Purpose Compute the amount of newspapers to bring per ... View the full answer
Related Book For
John E Freunds Mathematical Statistics with Applications
ISBN: 978-0134995373
8th edition
Authors: Irwin Miller, Marylees Miller
Posted Date:
Students also viewed these accounting questions
-
This spreadsheet can be used to calculate the amount of prepaid interest a buyer will need to pay at the closing. Write formulas for cells B9, B10, and B11. 1 Enter the loan amount. 3 Enter the...
-
Laboratory 7: List and String Review the related lecture note(s), and finish exercises below. 1. Write a Python program to create a list (named lab7.py): Create a list named myList and initialize it...
-
I want to write a java program to calculate the letter grades of each student in the class based on the scale shown on the course overview and the syllabus. Which type of decision structure would be...
-
In the OKR goal-setting framework, what is the difference between objectives and key results? Objectives deal with measurable aspects of a company's processes, while key results deal with...
-
Charles Spurge, a mathematician with Ansco Petroleum Company, wishes to develop a rational basis for timing his portfolio transactions. He currently holds a security portfolio with a market value of...
-
In addition to the planning matters considered in a manual accounting system, what additional ones should be considered when computer processing is involved?
-
Data for Jennifer Anistons business as at 31 December 20x9 are as follows: Required 1 Prepare a profit and loss account for the year ending 31 December 20x9. 2 Prepare a balance sheet as at 31...
-
Polly Esther Dress Shops Inc. can open a new store that will do an annual sales volume of $837,900. It will turn over its assets 1.9 times per year. The profit margin on sales will be 8 percent. What...
-
Advanced Network Associates Schedule of Fixed Asset Retirements Date Description Amount 1/12/2021 Exchanged 1 Deere Forklift Acquired 4/15/19: Cost 75,000 Accumulated depreciation thru 12-31-20...
-
Angela Care Homes Ltd. (Angela) operates 14 care homes for people suffering with mental illness in Western Canada. It hopes to expand to Eastern Canada over the next few years and is considering...
-
Sardinian beekeepers affiliated with Terrantiga cooperative produce and sell strawberry tree (corbezzolo) honey one of the very best and most rare honeys in the world. Terrantiga cooperative is a...
-
You shake a slinky continuously in an up and down fashion such that a transverse waves propagate horizontally down its length. If you count 5 peaks over a horizontal distance of 2 . 5 1 m , what is...
-
Using the case scenario below can help me answer the following questions? Officer Smith is on routine patrol during nighttime as a police officer. Smith sees a vehicle drive erratically and decides...
-
Judy bought 1 lb 6 oz of almonds, 2lb 3 oz of walnuts, and 8 oz of cashews. How many pounds of nuts did Judy buy?
-
in bound by evaluate (So (x-1)d A where D is the region y=x and y=3x-x
-
Devon Samuels sat in his jail cell, smiling. The two detectives had questioned him for three hours, but he only shook his head at every question. He didn't even want an attorney. He was very familiar...
-
A. In February, your new work assignment is the audit of Miramar Company's financial statement of 12/31/2021. The Manager in Charge gives the following audit assignment: Prepare a summary that...
-
4. Jobe dy -Y 2 et by
-
It is desired to test whether the number of gamma rays emitted per second by a certain radioactive sub-stance is a random variable having the Poisson distribution with = 2.4. Use the following data...
-
When the xs are equally spaced, the calculation of and can be simplified by coding the xs by assigning them the values . . . ,- 3,- 2,- 1, 0, 1, 2, 3, . . . when n is odd, or the values . . . ,- 5,-...
-
Using the data of Exercise 14.99, In exercise (a) Create a new variable, x 2 2 . (b) Fit a surface of the form (c) Find the correlation matrix of the three independent variables. Is there evidence of...
-
Determine whether the following statements are true or false. a. Full cost companies do not book AROs. b. An oral agreement to dismantle equipment and restore the environment at the end of the...
-
Problem 10 is the same as problem 9 with respect to initial measurement of the ARO liability. Now assume that Ameritecs credit standing improves over time, causing the credit-adjusted risk-free rate...
-
Exron Oil and Gas Company constructs a natural gas treatment facility in three phases. The first phase was completed and placed into service on December 31, 2017. The second phase was completed and...
Study smarter with the SolutionInn App