We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

# Fall 2011 CS506 Assignment # 1 Solution & Discussion Due Date: 31-10-2011

 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 = avgSQ/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.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Views: 3937

Attachments:

### Replies to This Discussion

kashif u have Solution ? if yes please share here

Nai brother mere pass solution nai hay ,,,,,,, Still trying to solve ....

yar kisi say b nai bani abi tak? me say yar data file say nikal nai raha file say nikal jai to assignment bn gae

try ho rahi hy ab dekhen

new modified assignment has been uploaded by our teacher.

new modified formula

avgSQ = avgSQ/N  ---- goes to  avgSQ = sumSQ/N

Brother MT sh this is right formula donot Worry

mateen Brother during the execution of the code input file not found ka error a raha ha where should be the input file copied.

import java.io.*;

public class Assignment1 { public static void main(String args[]){

System.out.println(s);

br.close();

fr.close(); }

catch(IOException ioex){

System.out.println(ioex); }

}
}

• File not found ka message print ho raha ha kase thek ho ga

## Latest Activity

ARhum replied to ARhum's discussion ****...Suno...****
10 minutes ago
1 hour ago
1 hour ago
ARhum posted discussions
1 hour ago
peaceful and Balaj Naveed joined +Roha's group

1 hour ago

1

2