Modify the program to add a function to sum the rainfall

Assignment Help Management Information Sys
Reference no: EM13995632

Hands-On Lab

Overview

This hands-on lab allows you to follow and experiment with the critical steps of developing a program including the program description, analysis, test plan, and implementation with C code. The example provided uses sequential, repetition, selection statements, functions, strings and arrays.

Program Description

This program will input and store meteorological data into an array. The program will prompt the user to enter the average monthly rainfall for a specific region and then use a loop to cycle through the array and print out each value. The program should store up 5 years of meteorological data. Data is collected once per month. The program should provide the option to the user of not entering any data.

Analysis

I 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 store up to 5 years of monthly data, the array size should be at least 5*12 = 60 elements. In a 2D array this will be RainData[5][12]. We can use #defines to set the number of years and months to eliminate hardcoding 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 also be 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 with labels for the printout.

Functions will be used to separate functionality into smaller work units. Functions for displaying the data and inputting the data will be used.

A selection statement will be used to determine if data should be entered.

Learning Exercises for you to complete-

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. 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. 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. 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.

Attachment:- Lab.rar

Reference no: EM13995632

Questions Cloud

What is the sample proportion : a. What is the sample proportion, p 5 proportion of contacts that resulted in a sale being made? b. For simple random samples of this size, what is the probability that p # 0.10?
Average deviation from perfect accuracy : If the manufacturer's claim is correct (i.e., µ, 5 30 seconds, a 5 10 seconds), what is the probability that the average deviation from perfect accuracy would be 34 seconds or more?
What is the velocity of the box as it leaves the table : Find the accleration of the box during the sliding period. What is the velocity of the box as it leaves the table. What horizontal distance (R) from the table will the block reach when it hits the ground.
What z-score corresponds to the sample mean : When a production machine is properly calibrated, it requires an average of 25 seconds per unit produced, with a standard deviation of 3 seconds. For a simple random sample of n 5 36 units, the sample mean is found to be }x 5 26.2 seconds per unit..
Modify the program to add a function to sum the rainfall : 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
What will be the frequency when the block is displaced : A 2.00-kg block is attached to the end of a horizontal ideal spring and rests on a frictionless surface. What will be the frequency when the block is displaced and released from rest again?
What speed can this car travel around curve b : Two banked curves have the same radius. Curve A is banked at 12.1o, and curve B is banked at an angle of 15.1 o. A car can travel around curve A without relying on friction at a speed of 13.1 m/s. At what speed can this car travel around curve B wi..
Find the vertical displacement : Find the vertical displacement D(t) between the raised hands of the two players for the time period after Boris has jumped (t>tR) but before Arabella has landed.Express your answer in terms of t, tR, g, and H.
What is the distance from the equilibrium position : What is the oscillation frequency? What is the mass position at t= 1.0 sec? What is the distance from the equilibrium position when v = 50 cm/s?

Reviews

Write a Review

Management Information Sys Questions & Answers

  How business requirements drove system initial developmet

Write a 700- to 1,050-word paper identifying and describing how specific systemused in an organization has transformed how the organization operates. Discuss how the business requirements drove the system's initial development

  How can social media in general help you in finding your job

Case- Enabling Global Payments at Paypal, How can social media in general help you in finding your dream job? How can it hurt

  Information technology case study sky-high airlines

case study sky-high airlines ltbrgtbackground ltbrgtsky-high airlines sha owns a number of small airline companies

  How is mobile driving the app revolution

How is mobile driving the app revolution? Please use your own words here as I am curious as to where you see apps going and in what industries they will be present

  Examine the challenges of developing applications

Examine the challenges of developing applications that run on mobile devices because of the small screen size. Describe the methods that can be used to decide which platform to support, i.e., iPhone, iPad, Windows Phone, or Android

  How will you customize your website to be mobile responsive

How will you customize your website to be mobile responsive? Will you build an app, and if so, what will the functionality and key features be?

  Javascript programwrite a simple javascript program that

javascript programwrite a simple javascript program that reads two numbers from the user and then displays the

  What is the significance of avi systems

What is the significance of AVI systems on airport operations and Graphic Information Systems are only used for construction projects at airports

  Purchase a system versus when to develop it in-houseyou are

purchase a system versus when to develop it in-houseyou are a manager in a company that has a lot of in-house is

  What kind of planning do you do before writing

What kind of planning do you do before writing? Where do you get information? Do you brainstorm? Make lists? Do you compose with pen and paper, a computer, or a dictating machine?

  Prepare for the wage portion of the negotiation

What are the objectives the company should pursue for negotiation and What is the appropriate information that should be sought to prepare for the wage portion of the negotiation?

  Explain the primary purpose of an erp system

Explain what is meant by ERP and explain the primary purpose of an ERP system. Use examples to support your answer

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