|
Assignment No. 01 |
Total Marks: 15
Due Date: 31/10/2011 |
||
|
Instructions Please read the following instructions carefully before solving & submitting assignment: It should be clear that your assignment will not get any credit (zero marks) if:
Uploading instructionsYour Submission must include:
Note: Use Notepad for coding and JDK package for java source code compilation and running (JDK is also available on download section of VULMS) ObjectiveThe objective of this assignment is
For any query about the assignment, contact at cs506@vu.edu.pk GOOD LUCK |
|||
|
|
Marks: 15 |
||
|
Question: Write a program that computes the average and standard deviation of the text floating point numbers in a file. Use the following formulas for the average and the standard deviation of N values. The formulas compute the sum, the sum of squares, the average, the average square, the variance, and finally, the standard deviation. sum = x1 + x2 + x3 + ... + xN-1 + xN
sumSQ = x12 + x22 + x32 + ... + xN-12 + xN2
avg = sum/N
avgSQ = sumSQ/N
var = avgSQ - avg2
sd = var(1/2) The input file will contain any number text floating point numbers, similar to the following: 10.5 12.9 9.67 12.05 8.23 10.08 10.23 7.7 10.4 11.34 Numbers could be several, or none per line, and negative numbers are perfectly OK. Note: All the source code should be written manually. Your code must justify enough for 15 marks. |
|||
|
Lectures Covered: This assignment covers Lecture # 01-09 Deadline Your assignment must be uploaded/submitted at or before 31/10/2011. |
|||
![]() |
Upload your Solution |

