logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Anmol AroraGeneral article writing
(5/5)

795 Answers

Hire Me
expert
Praveen MehraniyaComputer science
(/5)

956 Answers

Hire Me
expert
Trevor RamosEnglish
(5/5)

929 Answers

Hire Me
expert
Darshan MaheshwariEducation
(/5)

869 Answers

Hire Me
Java Programming

Climate change affects our weather, which in turn impacts many people and industries in different ways. People who are particularly susceptible to weather changes can use technology to help monitor

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Drought Detection Goal

Climate change affects our weather, which in turn impacts many people and industries in different ways. People who are particularly susceptible to weather changes can use technology to help monitor and predict weather situations that can negatively affect their businesses or livelihoods. In this lab, we are going to look at the beginnings of how you can write programs to analyze weather data to compute basic statistics--numerical summaries that are the foundation of predictive models.

Here, we are going to focus on rainfall and drought conditions, which influence many communities in different ways. You may have read about recent drought situations in different areas of this country, or on other continents. But while we all have an idea of what a drought is, it can actually be hard to measure. While droughts are caused by complex and interrelated issues, one of the main underlying forces is the availability of water. Lack of rainfall naturally reduces the amount of water available in an area, which can lead to meteorological drought One reason to do this is because some communities, particularly farming communities, can be significantly affected by drought, and farmers wish to monitor signs of impending drought conditions. One of the main indexes used to identify (or predict) drought compares accumulated rainfall amounts against historical averages. This information matters in many places in the world.

 

For example, in East Africa, many countries (and many families) depend heavily on agriculture and might see huge impacts from drought. That region includes many farms that produce coffee and tea--in fact, Kenya is the world's third biggest exporter of tea (behind China and India). However, the tea industry in this region includes a significant number of small, independently operated farms. These small farms operate season to season, and do not have the financial resources to survive the damage that can occur if an entire season's crops are destroyed. For individuals operating these farms, their lives depend on the weather.

Read the following two (brief) articles for more background:

While working on this assignment, think about how a drought where you live would affect you and your family. Also think about how it might affect a small, family-owned tea farm in Kenya, and what would be similar to or different from the local affects in the area where you live. Finally, think about what would be necessary to beyond the simple data reading/processing in this assignment to create a practical tool for drought identification.

Starting Materials

You have an option of either creating all your classes from scratch, or downloading program3.zip file which contains the skeleton code for the main classes.

Real Weather Data

Your assignment is driven by real-world weather data collected from weather observation stations. It is possible to get this information from various sources online, including NOAA, the National Oceanographic and Atmospheric Administration (see their Climate Data Online      (https://www.ncdc.noaa.gov/cdo-web/) web site). Here, we will be using some data collected from actual weather stations in Kenya. From NOAA's data sources, we've compiled daily summary information from weather station observations into a text format for you to use. The text file looks like this (but a lot longer):

 

KE000063612

3.117   35.617 515

2/10/16 0.04

87

98

73

KE000063820

-4.033 39.617 55

4/25/16 0

88

101

75

...

 

 

 

 

 

 

Each line in this text file represents the information from a single day at a single weather station. Each "word"

represents a separate piece of information. You'll be reading this input using a             so you can use            ,

, or                      to read individual data values from the line.

 

Each line contains 9 separate values, with whitespace in between. These are:

 

Name

Type

Example

Meaning

Station ID

text

KE000063612

The weather station's identifier (a unique name)

Latitude

floating point

3.117

The latitude of the weather station's location

Longitude

floating point

35.617

The longitude of the weather station's location

Altitude

integer

515

The elevation at the weather station's location (in feet)

Date

text

4/25/16

The date for this daily summary, in m/d/yy format

 

 

Name

Type

Example

Meaning

Precipitation

floating point

0.04

The total rainfall for that day

Avg Temp

integer

87

The average (mean) temperature for that day (in degrees Fahrenheit)

Max Temp

integer

98

The high temperature for that day

Min Temp

integer

73

The low temperature for that day

 

Note that some records use -1 as a value when data is missing in the precipitation or temperature fields. Such -1 values should be ignored in those positions.

Of these, in this assignment we will only use: the station ID, the month (which you can extract from the date using

), and the precipitation amount. The other values may be relevant in a more advanced drought identification process (for example, temperature information allows one to account for evaporation rate, which allows for more accurate models than those using rainfall alone).

At the same time, though, you can rely on all 9 values being present on every line. That may simplify the process of reading data from the input source.

Two example weather data files you can look at are:

 

 Kenya-short.txt    (http://courses.cs.vt.edu/~cs1114/Kenya-short.txt) : a really small file containing 5 weather summaries from 2 different weather stations in Kenya. Useful for looking at the format, or for simple software tests.

 Kenya-2014-2016.txt    (http://courses.cs.vt.edu/~cs1114/Kenya-2014-2016.txt) : a full file containing all available weather summaries from all weather stations in Kenya for 2014-2016.

However, when creating software tests for your solution, you can create your own test records directly inside your test cases, without using separate files (see the Java I/O tutorial for how to set up a Scanner with input text for testing).

Classes You Create

For this assignment, you will create three classes.

 

WeatherStation

This class represents the basic statistics collected by one weather observation station. Internally, a weather station should use an array to hold 12 monthly rain totals that represent the sum of precipitation numbers for all the days reported in that month. It should also use a separate array to hold 12 monthly counts that represent the number of daily records that have been processed for that month. Note that month numbers are passed into methods and returned as values between 1-12, even though your arrays are indexed starting at zero

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme