Your Perfect Assignment is Just a Click Away

Starting at $8.00 per Page

100% Original, Plagiarism Free, Customized to Your instructions!

glass
pen
clip
papers
heaphones

University of California San Diego Loop Code Block Java Project

University of California San Diego Loop Code Block Java Project

Question Description

Please make sure to submit the assessment with all of your code written below Question #9 in the Final Code Section. The code should be able to be copied and pasted into a program and then run without any changes being made to its format or syntax.

//1. Declare a variable named "counter" and assign it an initial value of 10.//2. Next, declare another new variable named "numbers" and assign it the initial value of an empty array.//3. Now, declare a for loop and configure it so that it runs a total of ten times. Within the loop's code block, increment the "counter" variable by 73, and push the new value of the "counter" variable into the "numbers" array.//4. Below the code for your for loop, console log out the "numbers" array to the console. //5. Next, create a conditional statement which checks if the value of the "counter" variable is greater than 740. If the value is greater than 740, console log the string "Maximum array number exceeded", if the value is not greater than 740, console log the string "Array values within specification".  //6. Now, declare a new variable named "stats". Assign it the value of an empty object literal.// Now that you have completed creating the arguments which will be passed into the function, it is time to create the function!//7a. Declare a function named "getStats".//7b. Declare two parameters for the "getStats" function,  "statsObj" (which will receive an object as an argument), and "numbersArr" (which will receive an array as an argument).// Within the "getStats" function's code block, create the following functionality://7c. Use a for loop to find the largest number in the "numberArr" parameter, and then assign that number to a new property on the "statsObj" parameter named "largestNum". Do not use the "Math" object, or any JavaScript function to find the largest number.//7d. Use a while loop to sum all of the numbers in the "numbersArr" parameter, and store that sum in a variable named "arrTotal". Do not use the "Math" object, or any JavaScript function to sum the numbers in the array.  //7e. Divide the value you stored in "arrTotal" by the total number of elements in "numbersArr" to get the average of all numbers in the "numbersArr" and assign that value into a variable named "arrAverage". Then, assign the value stored in the "arrAverage" variable to a property on the "statsObj" parameter named "averageNum".  //7f. Lastly, return the "statsObj" parameter from the function. // Outside of the "getStats" function, complete the final steps below://8. Call the "getStats" function and pass in the "stats" object and "numbers" array you created in steps 1 - 6 as arguments. Store the object which is returned from the "getStats" function into a variable named "returnedStats".//9. Finally, concatenate the values stored in the "returnedStats" object into appropriate places the following string "The largest number was ### and the average of all the numbers was ###" and console log the completed string to the console.


"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.