Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Use a two dimensional array to solve the following problem. A company has four salespeople ( 1 to 4) who sell five different products ( 1 to 5).

Once a day, each salesperson passes in a slip for each different type of product sold. Each slip contains the following:

a) The salespersons number
b) The product number
c) The total value of the product sold that day.

Thus, each salesperson passes in between 0 and 5 slips per day. Assume that the information from all the slips for last month is available. 
prepare a program that will read all this information for last month sales and summarize the total sales by salesperson by product. All totals should be stored in the two dimensional-array Sales. After processing all the information for last month, print the results in tabular format with each of the columns representing a particular salesperson and each of the rows representing a particular product. Cross total each row to get the total sales of each product for last month; cross total each column to get the total sales by salesperson for last month. Your tabular printout should include these cross totals to the right of the totaled rows and to the bottom of the totaled columns

Note: I have provided a data file that must be used for this assignment.

Here is a link to the file problem_7-20.txt 

Here is the layout for the data file: salesperson product number total sales
salesperson and product number are integers, total sales is a real number. 

You may need to refer back to the information I posted on Strings and File Input/Output on my web site.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9127924

Have any Question?


Related Questions in Computer Engineering

Can someone please help me with this pleasetaskthe purpose

Can Someone please help me with this please: Task: The purpose of this assignment is to empirically measure attributes for binary search trees. Steps: Create a program that will build a binary search tree (BST) by adding ...

Please do it in c programrevisit the matrix addition

Please do it in C program Revisit the matrix addition function Write the program so that it would not need to take a third pointer for the result matrix Instead, have the function return a pointer to the results matrix P ...

Whats the relationship between organizational performance

What's the relationship between organizational performance and financial management practices. These include capital structure decision, investment appraisal techniques, dividend policy, working capital management and fi ...

A federal agency responsible for enforcing laws governing

A federal agency responsible for enforcing laws governing weights and measures routinely inspect packages to determine whether the weight of the content is at least as great as that advertised on the package. A random sa ...

A shipment of 11 televisions sets contains 4 defective sets

A shipment of 11 televisions sets contains 4 defective sets. A hotel purchases 7 of these televisions sets. a: In how many ways can a hotel purchase 7 and receive 2 of the defective sets? b: What is the probability that ...

Question suppose we have 29 bytes of virtual memory and 27

Question : Suppose we have 29 bytes of virtual memory and 27 bytes of physical main memory. Suppose the page size is 23 bytes. (a) How many pages are there in virtual memory? (b) How many page frames are there in main me ...

Prior data indicates if a planter machine is operating

Prior data indicates if a planter machine is operating "properly," the length of the planter produced by the machine can be modeled as being normally distributed with a mean of 107 centimeters and a standard deviation of ...

One of the issues in early virtualization use was slow

One of the issues in early virtualization use was slow performance due to translation of system commands. Which piece of computer hardware was revised to run hypervisors natively? Also There are three "families" of opera ...

Use the management studio to create a new database called

Use the Management Studio to create a new database called the default settings(If the database already exists, use the Management Studio to delete it and than create it.

Questionthe stable matching problem as discussed in the

Question The Stable Matching Problem, as discussed in the text, assumes that all men and women have a fully ordered list of preferences. In this problem we will consider a version of the problem in which men and women ca ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As