2.2 nth Digit Tally Write a method called nthDigitTally, which calls updateTally. The method takes in two arguments: int n, which is the digit we are interested in, and an int [] nums, which is an...

Answer asap2.2 nth Digit Tally<br>Write a method called nthDigitTally, which calls updateTally. The<br>method takes in two arguments: int n, which is the digit we are interested<br>in, and an int [] nums, which is an array of numbers. nthDigitTally<br>returns a tally of frequencies of0 9 as the nth digit of all the numbers in<br>nums.<br>Here's a sample test case. These are enrollments in Research Triangle<br>Park colleges and universities in Fall 2000. 1<br>Institution<br>Enrollment<br>12176<br>Duke University<br>North Carolina Central University<br>Louisburg College (Junior College)<br>Campbell University<br>University of North Carolina at Chapel Hill<br>North Carolina State University<br>Meredith College<br>Peace College<br>Shaw University<br>St. Augustine's College<br>Southeastern Baptist Theological Seminary<br>5476<br>543<br>3490<br>24892<br>28619<br>2595<br>603<br>2527<br>1465<br>1858<br>Assume the variable enrollments contains the enrollment numbers from<br>that table. Then: nthDigitTally (0, enrollments) = [0,3,4,1,0,2,1,0,0,0]<br>

Extracted text: 2.2 nth Digit Tally Write a method called nthDigitTally, which calls updateTally. The method takes in two arguments: int n, which is the digit we are interested in, and an int [] nums, which is an array of numbers. nthDigitTally returns a tally of frequencies of0 9 as the nth digit of all the numbers in nums. Here's a sample test case. These are enrollments in Research Triangle Park colleges and universities in Fall 2000. 1 Institution Enrollment 12176 Duke University North Carolina Central University Louisburg College (Junior College) Campbell University University of North Carolina at Chapel Hill North Carolina State University Meredith College Peace College Shaw University St. Augustine's College Southeastern Baptist Theological Seminary 5476 543 3490 24892 28619 2595 603 2527 1465 1858 Assume the variable enrollments contains the enrollment numbers from that table. Then: nthDigitTally (0, enrollments) = [0,3,4,1,0,2,1,0,0,0]

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here