Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Lesson 1 - Quiz Assignment Instructions For this project, you will create the logic by creating both flowchart and pseudocode, and optionally, a C# program using arrays to calculate the standard...

1 answer below »
Lesson 1 - Quiz
Assignment Instructions
For this project, you will create the logic by creating both flowchart and pseudocode, and optionally, a C# program using a
ays to calculate the standard deviation of a list of 15 integers.
To calculate the standard deviation, you will need to create three a
ays:
1. The list of integers.
2. The difference between each integer and the mean (average) of all the integers.
3. The square of the difference.
Finally, you will total up the third a
ay, divide by the number of integers, and take the square root. The result is the standard deviation. After the calculations are complete, the mean and standard deviation should be output to the user and the program should exit.
Project Preparation
1. Start with the flowchart and pseudocode. Remember: An hour of planning can save you days of programming!
2. If you plan to write the code, use the Online GDB compiler. 
You may also use Visual Studio Community Edition or Visual Studio Code if you prefer.
3. The code to get you started is below. Highlight the code and copy/paste it into the Online GDB compiler. Set the language to C# and run the program. The program should input 15 numbers from the user, load the numbers to an a
ay called number, and output them back again to the user.
4. You may need to do some research (google searches) to figure out how to create certain statements in the C# language, like calculate a square root. The specifics for the C# language have not been presented in this class. Take baby steps, don't try to write the whole program at once.
(Tutorials Point has a good language reference:  https:
www.tutorialspoint.com/csharp/index.htm)
******************************************************************************

Program: This is the Parallel A
ays Program

*******************************************************************************
using System;
class ParallelA
ays {
class header for ParallelA
ays class
static void Main() {
method header for main method

int[] numbers= new int[15];
Declaration of a
ay with 15 elements

to store numbers.

Console.WriteLine("Welcome to the Parallel A
ays Program.\n");

for (int count = 0; count < 15; ++count)
{
for loop to repeat 15 times, to input numbers
XXXXXXXXXXConsole.Write(count+". Please enter an integer: ");
XXXXXXXXXXnumbers[count] = int.Parse(Console.ReadLine());
}

for (int count = 0; count < 15; ++count)
{
for loop to repeat 15 times, to output numbers
XXXXXXXXXXConsole.WriteLine(count+". The integer is : "+numbers[count]);
}

Console.WriteLine("\nThank you for using the Parallel A
ays Program. ");
Console.WriteLine("See you again soon!");
}
end main method
}
end Parallel A
ays class
Part 1: Create a Flowchart and Write Pseudocode
1. Read the requirements at the beginning of this assignment.
2. Create both a flowchart and pseudocode. Plan your work, then work the plan! 
3. Copy/paste your flowchart and pseudocode below.
Flowchart (required, insert below)
_____________________________________________________________________________________
Pseudocode (required, insert below)
Part 2: Write the Code (optional)
1. Start in the Online GDB compiler with the code given above.
2. Once you are ready to code, begin to modify the starter code adding a line or two at a time, then running the code to see if the program does what you expect it to.  If it doesn't, then take a look at what you changed in the code and try to understand why the code doesn't work.
3. Calculate the standard deviation for 15 numbers by hand, or use this Standard Deviation Calculator.  Once you know the standard deviation, see if your program works properly.
4. Remember that you can add Console.Writeln statements in different locations to print out the value of variables to follow what the program is doing.
5. Once you have a program that inputs 15 numbers, creates the three a
ays as described, and outputs the mean and standard deviation, you are done!  Copy/paste your final code below:
Submission Instructions
· If you would like, you can submit working C# code in addition to your required pseudocode and flowchart. This is optional, but if you decide to do so and expand your learning, your score on the assignment will consist of your work on the flowchart plus the best score on either the pseudocode or the C# code.
· C# is the only programming language that will be used throughout the course. Submission of code in any other language (Java, Python, C++, etc.) will be marked as zero, and you will be asked to resubmit, even if the code is co
ect.
· The code should be able to run when copied and pasted into an online compiler such as OnlineGDB.
· Although not required, feel free to include a screenshot of your executed code in the OnlineGDB.
_____________________________________________________________________________________
C# Code (optional, insert below)
Answered 10 days After May 06, 2021

Solution

Arun Shankar answered on May 11 2021
138 Votes
Flowchart
Pseudocode
int[] numbers= new int[15];
double[] diff = new double[15];
double[] diffSquare = new double[15];
double total = 0;
for i in 0..14:
numbers[i] = total = total + numbers[i]
double mean = total / 15.0;
double std_dev = 0;
for i in 0..14:
diff[i] = numbers[i] - total;
diffSquare[i] = diff[i] * diff[i];
std_dev += diffSquare[i];
std_dev = sqrt(std_dev / 15)
Print mean, std_dev
Code
*
Program: This is the Parallel A
ays Program
*
using System;
class header for ParallelA
ays class
class ParallelA
ays
{

...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here