Java Question
Need help with this assignment?Get an original answer from a qualified tutor — from $10/page.
Get it written →GEIT 1411 : Computer Science I Assignment 4 This assignment is about Arrays (Chapter 7). Declare the following array in the main() method of your Java program: double examScores[]={31,87.5,56,88,47,71.5,67.8,90,45,62}; Your task is to calculate and display the standard deviation (SD), rounded to 2 decimal places, of the exam scores. The SD can be calculated as follows: 1. Work out the Mean (the simple average of the numbers) 2. Then for each number: subtract the Mean and square the result. 3. Then work out the mean of those squared differences. 4. Take the square root of that and we are done! If you follow these steps, the SD for the exam scores should be 19.18. As an example, assume we would like to calculate SD for these numbers:1,3,5,2,9. Referencing the steps above: 1) Mean=(1+3+5+2+9)/5=4 2) (1 − 4)2 +(3 − 4)2 +(5 − 4)2 +(2 − 4)2 +(9 − 4)2 =9+1+1+4+25=40 3) Mean= 40/5=8 4) SD=sqrt(8)= 2.83 (rounded to 2 decimal places) As usual, submit your Java program and a screen shot of testing your program. 1
Get a plagiarism-free answer to this question
Send us your instructions and we’ll match you with the best writer in your subject.
- 100% human-written, zero AI
- Turnitin report included
- Confidential — we never share your data
- Free revisions & refunds