Write a program that calculates average of a number

Assignment Help Programming Languages
Reference no: EM131299096

Repetition Statements In this assignment, you will design a program to perform the following task: Write a program to calculate and display the average of an unknown number of positive floating point values entered by a user. The input is terminated by entry of any negative number.

1. Provide your analysis for the following problem statement: You need to write a program that calculates the average of a number of positive floating point values entered by a user. The number of values entered by the user will be different each time, and the user will indicate they have entered all values by inputting a negative number. Do not include the negative number in the average. Your analysis should be clearly written and demonstrate your thought process and steps used to analyze the problem. Be sure to include what is the required output. What is the necessary input and how you will obtain the required output from the given input. Also, include your variable names and definitions. Be sure to describe all necessary formulas and show sample calculations that show how the process works.

2. Provide your program design for the program you analyzed for calculating the average of an unknown number of floating point values. Be sure to describe the fundamental tasks (i.e., things your program must do) needed to solve the problem so you can use a modular design. Provide pseudocode of your overall design that includes the Main module and the order of the module calls, and a flow chart. You can use Word, Powerpoint, Visio or any software you have available that will allow to draw shapes and connectors. You may also download and use Raptor. Include header and step comments in your pseudocode.

3. Prepare input data (Test data) along with expected output for testing your program Your test data should be presented in the form of a table as was shown. Remember that you will be testing that a negative number ends the input, so your test data needs to include the negative number that marks the end of the input. Your test data should not show internal calculations or variables.

Reference no: EM131299096

Questions Cloud

Agent for an injured plaintiff : A lawyer works as an agent for an injured plaintiff. By working harder, the lawyer can increasethe payoff to her plaintiff. Assume there is no randomness;
Determine the am noise resulting from in : Determine the AM noise resulting from In.- Determine how the average value of the varactor capacitance varies with In.
Describe the nature of reform in the united states : Explain policymaking and legal process that underpin the individual health care and public health systems. Describe the nature of reform in the United States and the goals of healthcare reform
Describe the difference between the nyse and nasdaq : Describe the difference between the NYSE and NASDAQ. Define capitalization (or market capitalization). Describe the importance of the DOW JONES Index, What this index represents
Write a program that calculates average of a number : Provide your analysis for the following problem statement: You need to write a program that calculates the average of a number of positive floating point values entered by a user.
Is the graph still a correct display of the data : The artist has tried to make the graph attractive by using the wheel of a car for the "pie." Is the graph still a correct display of the data? Explain your answer.
Calculate the hazard quotient for drinking water : Using the equation for calculating dose from ingestion of groundwater on page 442 of the text, calculate the Hazard Quotient for drinking water containing allyl alcohol at a concentration of 50 µg/L.
Comparison between caulometry and electrogravimetry : Ask comparison between caulometry and electrogravimetry question #Minimum 100 words
Why is it important that a sample be random : Why is it important that a sample be random? What can you do if you cannot use a probability sampling technique

Reviews

Write a Review

Programming Languages Questions & Answers

  Use for loop to calculate sum of squares of numbers

Given int variables k and total which have already been declared, use the for loop to calculate sum of squares of first 50 counting numbers, and store this value in total.

  Write an application that asks the user to enter hourly wage

Write an application that asks the user to enter the base hourly wage for an employee and then asks the user to enter the number of hours worked for each week in the 4-week pay period.

  Write a function named dietoss

Write a function named dieToss that simulates the tossing of two dice. When you call the function, it should generate two random numbers ranged in 1 to 6 and return the sum of the die's numbers.

  Creating application to test class rectangle

Write down application to test class Rectangle.

  Design the swing applet and html test file

You can download sound clips and graphics images from Internet to use in the program. Design the Swing applet named JPartyPlanner and HTML test file to run Swing applet.

  Create classes for account and savingsaccount

Create and write three classes - Account, CheckingAccount, and SavingsAccount. Have CheckingAccount and SavingsAccount inherit from Account.

  Active directory infrastructure

Identify and describe the processes in creating, modifying and managing user accounts, creating groups, managing groups and resources.

  Now an electric resistor placed in the tank is turned on

an insulated rigid tank initially contains 1.4-kg saturated liquid water and water vapor at 200degc. at this state 25

  Write prolog clauses to define the relationships

Using Prolog, establish a database of facts and rules for the following predicates.

  Create two objects p and q and generate 10 random numbers

Create Two objects P and Q. in object P the array a is type int and size 10, in Q array a is string type and size 12b. Generate 10 random numbers

  Write web application that will give report of balance

Write the web application that will give a report of the balance held in a visitor's account during past several months.

  Functioning program that addresses behavioural design

ITECH2100 / ITECH6100. Task-2: Code a functioning program that addresses the behavioural and additional design requirements Write the classes that you have determined are needed to make a functioning program

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