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.


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More



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:











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


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)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Views: 3937


Replies to This Discussion

Upload Solution File

Myspace text generator

kashif u have Solution ? if yes please share here

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

any body reply time is short  please reply hurry.........................

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

please not

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[]){

FileReader fr=null;

BufferedReader br=null;

try{ fr=new FileReader("input.text");

br=new BufferedReader(fr);

String s=br.readLine(); while(s!=null); {




fr.close(); }

catch(IOException ioex){

System.out.println(ioex); }


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


Looking For Something? Search Here

Today Top Members 


This is a member-supported website. Your contribution is greatly appreciated!

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service