Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Javascript Write a test program that asks the user to enter the number of players. The program will then initialize a two dimensional array

In Javascript

Write a test program that asks the user to enter the number of players. The program will then initialize a two dimensional array with user input that stores integer values for Uniform number, At-bats, Hits, and Batting Average.

sample table:

Unif. #

At-bats

Hits

Average

23

10

2

7

10

3

8

10

1

32

9

6

1

10

2

9

10

3

25

10

1

24

10

1

13

3

2

calculate each player's batting average (hits/at-bats) and insert it into the two-dimensional array, the total team hits, team at-bats, and the team batting average. Denote the batting average leader(s) with an asterisk (*). All batting averages should be on a basis of 1000 (e.g. 667)

Sample runs:

Enter the total number of players:

9

Enter 9 rows and 3 columns:

Unif # At-bats Hits:

----- ------- -----

23 10 2

7 10 3

8 10 1

32 9 6

1 10 2

9 10 3

25 10 1

24 10 1

13 3 2

Unif # At-bats Hits Average

----- ------- ----- -------

23 10 2 200

7 10 3 300

8 10 1 100

32 9 6 667*

1 10 2 200

9 10 3 300

25 10 1 100

24 10 1 100

13 3 2 667*

Total: 82 21 256

* Batting average leader

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions

Question

2-1. What are six characteristics of effective teams? [LO-1]

Answered: 1 week ago

Question

Increasing investment time and money in employee training.

Answered: 1 week ago