Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using the previous workshop, solve these problems by using the pseudocode only not javascript code In the Programmer's Workshop, you study a business problem and
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
Step by Step Solution
★★★★★
3.49 Rating (142 Votes )
There are 3 Steps involved in it
Step: 1
Program Name Recyclying Calculator Purpose Compute the amount of newspapers to bring per ...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