ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 05 May 2017 My Price 9.00

Modify the program to add a function to sum

  1. 1.Modify the program to add a function to sum the rainfall for each year. (Hint: you need to sum for each year. You can do this using a looping structure). Support your experimentation with screen captures of executing the new code.
  2. 2.Enhance the program to allow the user to enter another meteorological element such as windspeed (e.g. 2.4 mph). Note, the user should be able to enter both rainfall and windspeed in your new implementation. Support your experimentation with screen captures of executing the new code.
  3. 3.Prepare a new test table with at least 2 distinct test cases listing input and expected output for the code you created after step 2.
  4. 4.What happens if you change the NUMMONTHS and NUMYEARS definitions to other values? Be sure to use both lower and higher values. Describe and implement fixes for any issues if errors results. Support your experimentation with screen captures of executing the new code.

 

 

1CMIS 102 Hands-On LabWeek 8OverviewThis hands-on lab allows you to follow and experiment with the critical steps of developing a programincluding the program description, analysis, test plan, and implementation with C code.The exampleprovided uses sequential, repetition, selection statements, functions, strings and arrays.Program DescriptionThis program will input and store meteorological data into an array. The program will prompt the user toenter the average monthly rainfall for a specific region and then use a loop to cycle through the arrayand print out each value. The program should store up 5 years of meteorological data. Data is collectedonce per month. The program should provide the option to the user of not entering any data.AnalysisI will use sequential, selection, and repetition programming statements and an array to store data.I will define a 2-D array of Float number: Raindata[][] to store the Float values input by the user. To storeup to 5 years of monthly data, the array size should be at least 5*12 = 60 elements. In a 2D array this willbe RainData[5][12]. We can use #defines to set the number of years and months to eliminate hard-coding values.A float number (rain) will also be needed to input the individual rain data.A nested for loop can be used to iterate through the array to enter Raindata. A nested for loop can alsobe used to print the data in the array.A array of strings can be used to store year and month names. This will allow a tabular display withlabels for the printout.Functions will be used to separate functionality into smaller work units. Functions for displaying the dataand inputting the data will be used.A selection statement will be used to determine if data should be entered.Test PlanTo verify this program is working properly the input values could be used for testing:Test CaseInputExpected Output1Enter data? = y1.22.23.32.210.212.22.30.40.21.12.1yearmonth rain2011Jan1.202011Feb2.202011Mar3.302011Apr2.202011May10.202011Jun12.202011Jul2.302011Aug0.402011Sep0.202011Oct1.102011Nov2.102011Dec0.40

Answers

(11)
Status NEW Posted 05 May 2017 07:05 AM My Price 9.00

-----------

Not Rated(0)