The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 364 Weeks Ago, 1 Day Ago |
| Questions Answered: | 1850 |
| Tutorials Posted: | 1850 |
Graduate in Biology and Nutrition, MBA Finance
Florida State University
Aug-2000 - Jul-2007
Ass. Relationship Manager
Penn-Florida
Mar-2009 - Feb-2016
Visual Studio C#
You are to take the program in the attached program.cs file and convert it to one that uses methods.
Â
Rubric:
Created at least two methods: 2.5 points
Â
Properly passed information to method:Â 2.5 points
Â
Program still works correctly:Â 5 points
Â
Â
using
using
using
using System;
System.Collections.Generic;
System.Linq;
System.Text; namespace Test_1_convert_to_method
{
/* Programmer: Robert S. Rokey
* Date Written: 5/29/17
*
* The following program will allow the user to enter a number of scores and
then provide the user with the high score, low score and the average
*
*
*/
class Program
{
static void Main(string args)
{
int number_of_scores;
double score, total_score = 0, high_score, low_score, average;
Console.Write("please enter the number of scores that you wish to process? "); number_of_scores = int.Parse(Console.ReadLine());
Console.Write("Please enter score " + 1 + " ");
score = double.Parse(Console.ReadLine());
high_score = score;
low_score = score;
for (int i = 2; i<= number_of_scores; i++)
{
Console.Write("Please enter score " + i + " ");
score = double.Parse(Console.ReadLine());
total_score = total_score + score;
if (score > high_score)
high_score = score;
if (score < low_score)
low_score = score;
}
average = total_score / number_of_scores;
Console.WriteLine("you
Console.WriteLine("The
Console.WriteLine("The
Console.WriteLine("The
}
} } entered " + number_of_scores + " scores");
high score is " + high_score);
low score is " + low_score);
average score is " + average);
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I