Use two-dimensional array in javascript to solve problem

Assignment Help Programming Languages
Reference no: EM1363176

Using javascript. 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 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 information from all the slips for last month is available. Write an application that will read all this information for last month's sales and summarize the total sales by salesperson and by product. All totals should be stored in the two-dimensional array sales. After processing all the information for last month, display the results in tabular format, with each column representing a particular 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 tabular output should include these cross-totals to the right of the totaled rows and to the bottom of the totaled columns.

Reference no: EM1363176

Questions Cloud

Describe the shape of the average total cost function : Describe the shape of the average total cost function and also label the minimum point on the curve.
Question related to business management scenario : Question related to Business Management Scenario - definition of "race" specified in the statutory language of Title VII includes the following racial categories
Solvency and liquidity problems : Choose a publicly held company. Look at the most recent Income Statement, Balance Sheet, and Statement of Cash Flows and decide if you will give this company a loan equal to 10 percent of their retained earnings.
Explain company profit not determined without information : In the short run the typical company increases its output but its total cost also rises. Hence, the effect on the company 's profit cannot be determined without more information.
Use two-dimensional array in javascript to solve problem : Using javascript. 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).
Developing a health promotion program or initiative : Imagine that you work with children with special needs and are tasked with developing a health promotion program/initiative there.
Explain and create a work breakdown structure : Explain and Create a Work Breakdown Structure (WBS) for building a two-story vinyl-sided home with 3 bedrooms and 2 bathrooms
Favorable or unfavorable variance : Sampson Apparel Incorporated incurred actual variable overhead expenses of $62,000 in the current year for the production of 10,000 units.
Implement a new performance management program : Prepare a memo to the Board describing what actions must be taken before the performance management program can be effectively implemented.

Reviews

Write a Review

Programming Languages Questions & Answers

  Comparing running time of two algorithm

Which algorithm would you prefer on the basis of running time, suppose all other factors equal?

  Describing program using suiatble printf command

Yyou have to describe all of this to user using suiatble printf() statements.

  Explain the use of xml dom

When the XMLHttpRequest object receives XML data, it parses and stores the data as an XML DOM object in the responseXML property. Why does the XML DOM used in the above example?

  C program to accept three numbers inputs by user

Write down C program to accept three numbers input by a user, and outputs a table of temperatures in Fahrenheit, Celsius, and Kelvin.

  Create visual basic windows application

Create Visual Basic Windows application. Use following names for solution and project, respectively: Raise Solution and Raise Project.

  Travelling salesman problem

Travelling Salesman Problem on the L1-metric plane.

  Write statement essential to call compute interest method

Write statement essential to call the calculate interest method with an account balance of $2300.00 and an interest rate of 5%. What rule must be adhered to when calling a method with multiple parameters?

  Writing program of long term parking

Write an enitre program about the long term parking, and calculate the parking total fare.

  Class to create and draw five squares

Now write applet DrawSquares that uses your Square class to design and draw 5 squares. This code must be very simple.

  Specific changes made for different countries-sites directed

Why were these specific changes made for different countries at whom the sites were directed? Is there anything else you would consider changing.

  Program that uses for loop prompt user to input two integers

Write a program that uses for loop to preform the following steps: Prompt the user to input two integers: firstnum and secondnum.

  Designing class to denote person-s height

Design a class, PersonHeight, to denote the person's height. Our class will include the following members.

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