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...
-
Refer to the data in exercise 2. The estimated regression equation for those data is y-bar = 1 8.4 + 2.01x1 + 4.74x2 a. Develop a 95% confidence interval for the mean value of y when x1 = 45 and x2...
-
Identify the circumstances that may warrant the expression of (a) a qualified opinion, (b) an adverse opinion, and (c) a disclaimer of opinion.
-
What advantages are there to using social media sites for informal discovery? How may the information you find help in settling a civil lawsuit?
-
Tolbert Company incurs these expenditures in purchasing a truck: cash price $24,000; accident insurance (during use) $2,000; sales taxes $1,080; motor vehicle license $300; and painting and lettering...
-
What are the key determinants of organizational resilience in the face of disruptive changes, and how can leaders cultivate adaptability among their teams ?
-
Warden Repairs showed the following adjusted account balances on October 31, 2023. Prepare and post the closing entries. Assets 250 Withdrawals 20 Income Summary Liabilities 110 Revenue 100 Capital...
-
2. * (Inspired by CT1 exam April '09) A company has agreed to rent a warehouse for 30 years. The rent will be paid quarterly in advance and will increase every three years at the rate of 3% per annum...
-
Which theory was based on the belief that it was better to keep production facilities close to the market and to the firm's center of decision making, given the uncertainty and risks inherent in...
-
What are the consequences of the digital divide on global education and economic opportunities ?
-
How can international regulations balance technological innovation with privacy and data protection ?
-
Suppose that JT Minn sells 16 phones for $107 per phone. Each phone costs $69 to produce, and JT Minn could rent out their factory space for $490 per month. What is JT Minn's Accounting Profit?...
-
Sigismund has a 4 % ten - year $ 7 5 0 , 0 0 0 bond outstanding that has a current discount of $ 1 1 6 , 4 1 2 . The market rate of interest when the bond was issued was 6 % . Record the journal...
-
Explain why do we call retained earnings "earned capital"? A Company was founded in 2013. Its yearly earnings and dividend payments are own here: 2013: Net income of $4,000, paid zero dividends 2014:...
-
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...
-
A hospitals records show that the cost of carrying out health checks in the last five accounting periods has been as follows: Using the highlow method and ignoring inflation, the estimated cost of...
-
Intermediate: Cost estimation using the linear regression formula. The management accountant at Josephine Ltd is trying to predict the quarterly total maintenance cost for a group of similar...
-
The budget for the production cost of a new product was based on the following assumptions: (i) Time for the 1 st batch of output = 10 hours (ii) Learning rate = 80 per cent (iii) Learning will cease...
Study smarter with the SolutionInn App