Write a program that takes its input from a binary file

Assignment Help Computer Engineering
Reference no: EM13323188

Write a program that takes its input from a binary file of numbers of type double. The file contains nothing but numbers of type double written to the file with writeDouble. The program outputs to the screen the average and standard devia- tion of the numbers in the file. The standard deviation of a list of numbers n1, n2, n3, and so forth is defined as the square root of the average of the following numbers:

(n1 - a)2, (n2 - a)2, (n3 - a)2, and so forth.

The number a is the average of the numbers n1, n2, n3, and so forth. Hint: Write your program so that it first reads the entire file and computes the average of all the numbers, then closes the file, and then reopens the file and computes the standard deviation.

 

Reference no: EM13323188

Questions Cloud

How many blocks in a virtual page : A process of a system has a virtual memory space of 2048 words or addresses with a page size of 32 words. There are 8 blocks in the main memory with 16 words per block. How many blocks in a virtual page?
Explain the partial pressures of gas b dissolved in liquid a : The partial pressures of gas B dissolved in liquid A at 298 K are listed in the table below. If the vapor pressure of pure B at this temperature is 9500 Kpa, does this solution obey Raoult's Law
What length l will you choose for your wire : You've made the finals of the Science Olympics! As one of your tasks, you're given 1.5g of copper and asked to make a cylindrical wire, What length l will you choose for your wire
Determine the smallest wall thickness which may be used : A spherical pressurevessel of 1.2m outside diameter is to be fabricated from a steelhaving an ultimate stress of σU450 MPa. Knowing that a factor of safetyof 4.0 is desired and that the gage pressure may reach 3 MPa,
Write a program that takes its input from a binary file : The number a is the average of the numbers n1, n2, n3, and so forth. Hint: Write your program so that it first reads the entire file and computes the average of all the numbers, then closes the file, and then reopens the file and computes the stan..
Determine normalstress in basketball of 12 inches diameter : Determine the normalstress in a basketball of 12 inches diameter and 0.1 inch wall thickness which has been inflated to a gage pressure of 15psi.
What is the atomic number : An atom is ionized so that it has only one electron. When the electron drops from the n = 4 shell to the n = 1 shell, What is the atomic number
Determine what flow rate are required from the local well : a town requiring 2 cms ofwater has two sources, a local well with 15 g/m^3 of a contaminantand a distant surface water source with 2 g/m^3 of the contaminant.
What is the width of the slit : A helium-neon laser (wavelength=666 nm) illuminates a single slit and is observed on a screen 1.5 m behind the slit. What is the width (in mm) of the slit

Reviews

Write a Review

 

Computer Engineering Questions & Answers

  A variety of both technical and business skill sets

An effective project manager wants a variety of both technical and business skill sets. recognize the nontechnical skills that have been associated with superior project management.

  Find the difference between a blog and a wiki

Explains what blogs are and how they could be used in a business environment. Give two examples of how a business might use blogs. What is the difference between a blog and a wiki.

  Explain flow rate and elevation calculation

Pump Problem: Flow Rate and Elevation Calculation Ethylbenzene at 40 degrees C is delivered by a pump from a storage tank to a reactor elevated 3.5 m above the pump.

  Define java programming with commented code

Java Programming with Commented Code, A marketing research company has hired you to develop a program. Analytics Nation, Inc. has gathered information from about five different products

  C++ questions

Define an enum type, bookType, along with the values CSC, MATH, ENGLISH, HISTORY, PHYSICS, and PHILOSOPHY. Declare a variable book of type book Type.

  How build a secure ecommerce system

select one security issue (e.g., payment security, customer privacy, and reliability) related to eCommerce systems. Which security technologies could be used to build a secure eCommerce system.

  Desktop pc and a computer suitable as a web server

This solution provides the learner with an understanding of two and 3 tierd architectures and explains the role of each architecture. Futher this solution explain the main differences between a desktop PC and a computer suitable as a web server.

  How to using the prompt and alert functions

compute the average (mean) of the 5 marks as a rounded integer or a floating point number.

  Give promising technology for the effective automation

Web services are emerging as a promising technology for the effective automation of inter-organizational interactions. How do you see you company being involved in Web Services in the future.

  What is a source code control system

What is a source code control system? Why is such a system required when multiple programmers build a program or system?

  Compute the record size r in bytes

suppose the file is ordered by SSN; calculate the number of blocks it takes to search for a record given its SSN value by doing a binary search.

  Related to investment in stock group

Specify the minimum amount Trader must invest in each stock group in order to achieve the investment goal?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd