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 in Assignment 1. 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.
Your completed assignment should be saved as two files and submitted to your LEO assignment area no later than the due date
- The first file is a Word document containing your problem analysis, program design, and test data. Your document should be neat, well-written with minimal grammatical and spelling errors. Your name should be clearly listed on the first page along with the class/section, professor and due date. Your document should contain page numbers at the bottom of each page, and be single spaced.
- The second file will contain your flow chart. Nothing other than the chart should be in this file. If you use Raptor, you may submit the .rap file instead of a Word file fr this second file.
You should name the first file lastname_firstname_HW3.docx (or lastname_firstname_HW3.doc). So if my name was ***** *****, I would name my document Smith_Pat_HW3.docx. The second file is named lastname_firstname_HW3_flowchart.docx (or lastname_firstname_HW3_flowchart.doc). So if my name was ***** *****, I would name my document Smith_Pat_HW3_flowchart.docx.
If you make your flowchart with a program other than Word, use the appropriate extension instead of the doc or docx above. Raptor files can always be submitted for flowcharts. If you use some program other than MS Word or Raptor, check with me first to be sure that I can read the file. Programs that I cannot access are not acceptable for submissions.
Your submission needs to meet the submission requirements. That means that it must be a Word document. Email submissions are not acceptable; it must be submitted through the WebTycho assignment area. The name of the file must meet the file naming requirements.
If you do not have an acceptable submission, it will be returned to you for resubmission. The due date will continue to apply if you do not submit an acceptable submission in your original attempt.
The following are examples of what is not acceptable
- Open Office format file
- .txt file
- Microsoft Works format file
- a Word template file, that is the file name ends with .dot instead of .doc or .docx
- anything other than a Microsoft Word document file
An example HW3.doc template file containing the required sections is included in the available resources. You should use this document to start your writing and fill in all of the details required.