Assignment on the two-dimensional array sales

Assignment Help Programming Languages
Reference no: EM13780926

1. 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 passesin a slip for each type of product sold. Each slip contains the following:

a) The salesperson number

b) The product number

c) The total dollar value of that product sold that day

Thus, each salesperson passes in between 0 and 5 sales slips per day. Assume that the informationfrom all the slips for last month is available.Write an application that will read all this information forlast month's sales and summarize the total sales by salesperson and by product. All totals should bestored in the two-dimensional array sales. After processing all the information for last month, displaythe results in tabular format, with each column representing a salesperson and each row 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 output shouldinclude these cross-totals to the right of the totaled rows and to the bottom of the totaled columns.

Test your answer using:

{
{1, 4, 20},
{1, 5, 30},
{2, 5, 25},
{3, 3, 50},
{4, 2, 80},
{1, 4, 30},
{2, 3, 25},
{3, 4, 20},
{4, 3, 45},
{1, 1, 10},
}

Reference no: EM13780926

Questions Cloud

Implementation-strategic controls and contingency plans : Resource: Implementation, Strategic Controls, and Contingency Plans assignment with facilitator feedback Complete a strategic plan for your organization of  1,000-1,500 words.
Direct investment and financial risk assessment : Identification and explanation of the key internal structures (at least 3) that will be designed to enhance the culture within your organization
Write a fact pattern about the ground : Write a fact pattern about the ground, asking the question, can the Husband or Wife obtain a divorce based upon these facts
Explain state law that apply storage of alcoholic beverages : Explain the Federal, state, and local laws that apply to purchase, storage, and consumption of alcoholic beverages when catering an event in your city of choice.
Assignment on the two-dimensional array sales : 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 passesin a slip for each type of product sold. Each slip contains the follo..
Diversity-inequality and immigration in human services : Overview of Inequality. Present the history of inequality and racial injustice in our society. Discuss the current disparities in housing and home ownership, health, health insurance, social mobility, employment status, and politica..
Expectations for the psychology major : This course provided you an overview of the discipline of psychology, including expectations for the psychology major, career options for students completing a bachelor's degree in psychology, and career options for students who pursue a graduate ..
Product idea-business model : Using your product example from the previous Discussion Board post, begin your paper with the following:
Describe specific engineering and manufacturing process : Describe specific engineering and manufacturing process planned to be used in the development of lithium air battery. Potential defects and that cause deviations in the development process. How this process can be used to minimize the amount of waste..

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program which inputs employee name

Write the program which inputs Employee Name and Tuition and prints, for each employee, Name and Rebate Amount.

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Run the program with a file name

Write a short Python program that asks the user to input two numbers, and then divides the first number by the second. The program must use an exception handling structure to process the situation when the denominator is zero. Run your program wit..

  Determine proper lower bound and upper bound on ?nal value

Determine the proper lower bound and upper bound on the ?nal value of the shared variable tally output by this concurrent program.

  Write code to find largest value found in parking tickets

Without using any additional variables, write some code that results in mostTickets containing the largest value found in parkingTickets.

  Write bash script to copy file from one location to another

Write a bash script called mycopy that copies a file from one location to another. An example of running the script is given below.

  Write parameterized function to play the game

Your program cannot use file level variables or constants; your program cannot use global variables or constants. The functions that you write exchange data by means of return statements and value parameters and reference parameters

  Explain circumstances in which we can implement array

If you were describing the array to friend who is learning Java, how would you do so? Explain circumstances in which you could implement the array.

  Write program which instantiates objects of classes

Private data of Quadrilateral must be the x-y coordinate pairs for four end-points of the Quadrilateral. Write a program which instantiates objects of your classes and outputs each objects area (except Quadrilateral.

  Design application that gets customer account data

Design an application that gets customer account data that includes an account number, customer name, and balance due.

  Design the array to do letter count for letters in alphabet

Design the array of 26 components to do letter count for 26 letters in alphabet and a variable for line count. (You may wish to call these variables letterCount and lineCount respectively.)

  Compute and display number of miles per hour

Once correct data has been entered, the program muts compute and display number of miles per hour over the speed limit that the driver was doing.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd