Starting Out with Programming Logic and Design (4th Edition)
Starting Out with Programming Logic and Design (4th Edition)
4th Edition
ISBN: 9780133985078
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 10, Problem 8PE

Sales Report

Brewster's Used Cars, Inc. employs several salespeople. Brewster, the owner of the company, has provided a file that contains sales records for each salesperson for the past month. Each record in the file contains the following two fields:

  • The salesperson's ID number, as an integer
  • The amount of a sale, as a real number

The records are already sorted by salesperson ID. Brewster wants you to design a program that prints a sales report. The report should show each salesperson's sales and the total sales for that salesperson. The report should also show the total sales for all salespeople for the month. Here is an example of how the sales report should appear:

Brewster’s Used Cars, Inc.

Sales Report

Salesperson ID Sale Amount
100 $10,000.00
100 $12,000.00
100 $5,000.00

Total sales for this salesperson : $27,000.00

101 $14,000.00
101 $18,000.00
101 $12,500.00

Total sales for this salesperson: $44,500.00

102 $13,500.00
102 $14,500.00
102 $20,000.00

Total sales for this salesperson: $48,000.00

Total of all sales: $119,500.00

Blurred answer
Students have asked these similar questions
PROGRAMMING PROBLEM The inventory of a shoe store lists shoes by stock number. With each stock number, there is associated a style number in the range of 0 to 50, the number of pairs in each size (sizes range from 3 to 14) and a price. A program is to be written to keep track of the inventory. The user is given the following choices: enter a new record, display a record, change the price of the stock item, or change the number on hand. When specifying a record the user may give either the stock number, or the style number. The array index can be used as a stock number. If the user decides to change the stock on hand, the program should ask which sizes will have their stock on hand changed. The program should be designed to run indefinitely, keeping track of changed in stock.
// This pseudocode should create a list that describes annual profit // statistics for a retail store. Input records contain a department // name (for example, ìCosmeticsî) and profits for each quarter for // the last two years. The program should determine whether // the profit is higher, lower, or the same // for this full year compared to the last full year. start Declarations string department num salesQuarter1ThisYear num salesQuarter2ThisYear num salesQuarter3ThisYear num salesQuarter3ThisYear num salesQuarter1LastYear num salesQuarter2LastYear num salesQuarter3ThisYear num salesQuarter4LastYear num totalThisYear num totalLastYear string status num QUIT = "ZZZZ" housekeeping() while department <> QUIT compareProfit() endwhile finishUp() stop housekeeping()DEBUG04-02.txt output "Enter department name or ", QUIT, " to quit " input dept return compareProfit()…
11 Worksheet 5 Note:Solution using Matlab Code Write a program that prompts the user to enter a number within the range of 1 through 7, those numbers represent the weekdays as shown in the table. If the entered number is more than 7, display 'invalid day'. Number 1 2 3 4 5 6 7 Day Sunday Monday Tuesday Wednesday Thursday Friday Saturday Type of the day Workday Workday Workday Workday Workday Weekend Weekend The program should continue to repeat itself 10 times, after which, the program should stop. Furthermore, the program should be able to show a message saying if this is a 'workday' or a 'weekend day'. Note: you are required to add a comment beside your command. Hint: to add a comment you may use the % sign. thank guys you dodo great.

Chapter 10 Solutions

Starting Out with Programming Logic and Design (4th Edition)

Ch. 10.1 - Prob. 10.11CPCh. 10.1 - Prob. 10.12CPCh. 10.1 - What is a files read position? Initially, where is...Ch. 10.1 - In what mode do you open a file if you want to...Ch. 10.2 - Prob. 10.15CPCh. 10.2 - What is the purpose of the eof function?Ch. 10.2 - Is it acceptable for a program to attempt to read...Ch. 10.2 - Prob. 10.18CPCh. 10.2 - Which of the following loops would you use to read...Ch. 10.4 - Prob. 10.20CPCh. 10.4 - Prob. 10.21CPCh. 10.4 - Prob. 10.22CPCh. 10 - A file that data is written to is known as a(n) a....Ch. 10 - A file that data is read from is known as a(n) a....Ch. 10 - Before a file can be used by a program, it must be...Ch. 10 - When a program is finished using a file, it should...Ch. 10 - The contents of this type of file can be viewed in...Ch. 10 - This type of file contains data that has not been...Ch. 10 - When working with this type of file, you access...Ch. 10 - When working with this type of file, you can jump...Ch. 10 - This is a small holding section in memory that...Ch. 10 - Prob. 10MCCh. 10 - This is a character or set of characters that...Ch. 10 - This marks the location of the next item that will...Ch. 10 - When a file is opened in this mode, data will be...Ch. 10 - The expression NOT eof (myFi1e) is equivalent to...Ch. 10 - This is a single piece of data within a record. a....Ch. 10 - When working with a sequential access file, you...Ch. 10 - In most languages, when you open an output file...Ch. 10 - The process of opening a file is only necessary...Ch. 10 - Prob. 4TFCh. 10 - Prob. 5TFCh. 10 - When a file that already exists is opened in...Ch. 10 - In control break logic, the program performs some...Ch. 10 - Describe the three steps that must be taken when a...Ch. 10 - Why should a program close a file when its...Ch. 10 - What is a files read position? Where is the read...Ch. 10 - If an existing file is opened in append mode, what...Ch. 10 - In most languages, if a file does not exist and a...Ch. 10 - What is the purpose of the eof function that was...Ch. 10 - What is control break logic?Ch. 10 - Design a program that opens an output file with...Ch. 10 - Design a program that opens the my_name.dat file...Ch. 10 - Prob. 3AWCh. 10 - Design an algorithm that does the following: opens...Ch. 10 - Modify the algorithm that you designed in question...Ch. 10 - Write pseudocode that opens an output file with...Ch. 10 - Prob. 7AWCh. 10 - A file exists on the disk named students.dat. The...Ch. 10 - Why doesn't the following pseudocode module work...Ch. 10 - File Display Assume that a file containing a...Ch. 10 - Item Counter Assume that a file containing a...Ch. 10 - Sum of Numbers Assume that a file containing a...Ch. 10 - Average of Numbers Assume that a file containing a...Ch. 10 - Largest Number Assume that a file containing a...Ch. 10 - Golf Scores The Springfork Amateur Golf Club has a...Ch. 10 - Sales Report Brewster's Used Cars, Inc. employs...
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
C - File I/O; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=cEfuwpbGi1k;License: Standard YouTube License, CC-BY
file handling functions in c | fprintf, fscanf, fread, fwrite |; Author: Education 4u;https://www.youtube.com/watch?v=aqeXS1bJihA;License: Standard Youtube License