php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS506 Web Design and Development assignment no 1 spring fall 25 october 2011
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
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.
[FONT=&quot]sum = x1 + x2 + x3 + ... + xN-1 + xN [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]sumSQ = x12 + x22 + x32 + ... + xN-12 + xN2 [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]avg = sum/N[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]avgSQ = sumSQ/N[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]var = avgSQ - avg2[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]sd = var(1/2)[/FONT]
The input file will contain any number text floating point numbers, similar to the following:
[FONT=&quot]10.5[/FONT]
[FONT=&quot]12.9[/FONT]
[FONT=&quot]9.67[/FONT]
[FONT=&quot]12.05[/FONT]
[FONT=&quot]8.23[/FONT]
[FONT=&quot]10.08[/FONT]
[FONT=&quot]10.23[/FONT]
[FONT=&quot]7.7[/FONT]
[FONT=&quot]10.4[/FONT]
[FONT=&quot]11.34[/FONT]
Numbers could be several, or none per line, and negative numbers are perfectly OK. [FONT=&quot][/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Note: [/FONT][FONT=&quot]All the source code should be written manually. Your code must justify enough for 15 marks[/FONT]


Attached Files
.doc   Fall 2011_CS506_1.doc (Size: 159.5 KB / Downloads: 222)

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply
#2
I want the slution hurry . . . . . . .. . . i Want it
Reply
#3
why don't you discuss it with us.
[SIZE="3"]03009520262[/SIZE]
Rabeel Website
Reply
#4
please come guys we try to solve it if no body give solution time is very very short
Reply
#5
yah sure that's the good idea.
[SIZE="3"]03009520262[/SIZE]
Rabeel Website
Reply
#6
Why u always attach the assignment instead of solution. This is already available on vulms. We search the solution and get this bullz shit. We dont need this. Stop hanging this shit
Reply
#7
Code:
SAVE THIS FILE IN .JAVA import java.io.*; import java.util.*; import javax.swing.*; public class assignment1{ public static void main( String args[] ){ try{ FileReader fr = null; BufferedReader br = null; fr = new FileReader ("input.txt"); br = new BufferedReader (fr); String line = br.readLine(); double sum =0 ; while (line != null) { double num = Double.parseDouble(line); sum += num; line = br.readLine(); } JOptionPane.showMessageDialog(null, "Sum = " + sum); br.close(); fr.close(); } catch(NumberFormatException nfEx) { System.out.println(nfEx); } catch(FileNotFoundException fnfEx){ System.out.println(fnfEx); } catch(IOException ioEx){ System.out.println(ioEx); } } }

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply
#8
the above code will work fine incase you save another file named input.txt in the folder in which you have already saved ur above prog ie.
//input.txt
//txt file for assignment1
10.3
20.4
30.5
40.6
50.7
//if i am wrong then guide me please
Reply
#9
Incomplete file.....

[FONT=&quot]sumSQ = x12 + x22 + x32 + ... + xN-12 + xN2 [/FONT]

[FONT=&quot]avg = sum/N[/FONT]

[FONT=&quot]avgSQ = sumSQ/N[/FONT]

[FONT=&quot]var = avgSQ - avg2


are missing .
[/FONT]
Reply
#10
Code:
SAVE THIS FILE IN .JAVA import java.io.*; import java.util.*; import javax.swing.*; public class assignment1{ public static void main( String args[] ){ try{ FileReader fr = null; BufferedReader br = null; fr = new FileReader ("input.txt"); br = new BufferedReader (fr); String line = br.readLine(); double sum =0 ; while (line != null) { double num = Double.parseDouble(line); sum += num; line = br.readLine(); } JOptionPane.showMessageDialog(null, "Sum = " + sum); br.close(); fr.close(); } catch(NumberFormatException nfEx) { System.out.println(nfEx); } catch(FileNotFoundException fnfEx){ System.out.println(fnfEx); } catch(IOException ioEx){ System.out.println(ioEx); } } }

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CS301 Assignment # 4 Due Date: 02-Feb-2016 Vuhelper 0 2,369 02-03-2016, 05:38 PM
Last Post: Vuhelper
  CS703 – Advanced Operating Systems Assignment No.3 solution January 2016 Vuhelper 0 5,957 01-23-2016, 09:58 PM
Last Post: Vuhelper
  CS601 Data Communication Assignment No. 03 Solution 23rd January 2016 Vuhelper 1 1,989 01-23-2016, 06:09 PM
Last Post: Vuhelper
  CS403 Assignment No. 03 Solution 23rd January 2016 Vuhelper 2 1,228 01-23-2016, 03:18 PM
Last Post: Vuhelper
  CS506 Web Design and Development Assignment no 3 Solution 3rd January 2016 Vuhelper 0 2,294 01-23-2016, 03:16 PM
Last Post: Vuhelper
  CS724 Software Process Improvement Assignment No 01 Solution 20th January 2016 Vuhelper 0 2,022 01-20-2016, 06:26 PM
Last Post: Vuhelper
  CS711 Software Design Assignment No 01 Solution Due Date Feb 12, 2016 Vuhelper 0 1,715 01-20-2016, 06:24 PM
Last Post: Vuhelper
  CS709 Formal Methods for Software Engineering Assignment No 01 Solution January 2016 Vuhelper 0 1,853 01-20-2016, 06:22 PM
Last Post: Vuhelper
  cs703 assignment no 3 Solution 20th January 2016 Vuhelper 0 1,752 01-20-2016, 06:20 PM
Last Post: Vuhelper
  CS704 Assignment No. 01 Solution January 2016 Vuhelper 0 4,853 01-20-2016, 06:19 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 2 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support