How one class uses another class elegantly

Assignment Help Computer Engineering
Reference no: EM131936592

Assignment: Weather Data Processing System

Objectives

The objectives of this homework assignment:

1. Familiarize with the use of arrays

a. Manipulate a collection of data values (objects) using an array
b. Compute statistics out of an array of values
c. Declare and use an array of reference data types

2. Familiarize with the use of exception handling for data format and range checking

3. Master the use of standard Java classes

a. How to find out what these classes are through the online Application Program Interface (API)
b. How to find out about the data members of these classes through the online API
c. How to find out how to use the methods of these classes through the online API

4. Understand the concept of object-oriented programming.

a. How one class uses another class elegantly!
b. Understand the concepts of object instantiation.

5. Familiarize with methods

a. How to use the results of one method in another method

6. Use existing classes

7. Familiarize with code documentation, compilation, and execution

8. Expose to Java syntax, programming styles, and Java classes

Problem Description

For this homework assignment, you are to create an application to process weather data. In order to do this, you will need to create a weather data class that stores the recorded weather data for a specific day at a specific location. You will use this class to create objects that you store in an array for the processing application. You will be required to get the data from a supplied data loading class and store the weather data objects for the entire year of 2008 at four locations in a single multi-dimensioned array. The weather data processed in the system should be stored in Java arrays. Note: You cannot use JCF classes or any standard classes to store the weather data objects.

You are given the following set of minimum requirements to design and implement the weather data class that stores the recorded weather data for a specific day at a specific location.

1. The class should be able to store the following attributes:

a. Location (String)
b. Date (Gregorian Calendar)
c. High Temp (Integer)
d. Low Temp (Integer)
e. Average Wind Speed (Integer)
f. Max Wind Gust (Integer)
g. Precipitation (Double)

2. All data values should have "get" and "set" methods for storing and accessing the data of the class.

3. This class should be able to nicely "print" itself.

You are given the following set of requirements to design and implement the overall weather data processing application.

1. First, your system will need to load the weather data from a supplied class called WeatherDataLoad.java into your array of objects. This class has all the individual data values for the High Temp, Low Temp, Average Wind, Max Wind, and Precipitation stored in order by location by date. You will need to review this class, understand how it works, and call its methods in order to load all of your Weather Data objects with the appropriate data. Data in the WeatherDataLoad.java class represent all of the weather data from 2008 for the following four towns/cities: Eagle, NE; New York, NY; Houston, TX; and LA, CA. The data is ordered for each attribute starting with Eagle, NE on January 1st, 2008. It has the full year of Eagle's data before it moves on to NY's data. NY's year of data is followed by Houston's data and all of the data ends with LA, CA on December 31st, 2008. Please keep in mind that 2008 was a leap year, so there is 29 days worth of values for February for each town/city.

2. You should store all of the weather data in a single three dimensioned array. This array will have an individual weather data record object for each day (up to 31) for each of the twelve months for each of the four cities. The weather data processed in the system should be stored in Java arrays. Note: You cannot use JCF classes or any standard classes to store the weather data objects. You are also expected to properly handle any exceptions that could be thrown during the processing of your array.

3. Once the data is loaded, then the user should have some options for processing the weather data. This should be a "menu" of choices for the user to choose from and the user should be able to continue to use the overall program until they decide to quit. You are also expected to properly handle any exceptions that could be thrown during the processing of user input/entry. The main menu will need to support the following features:

a. Weather Record: The user should be able to enter a date (MM/DD/2008) and see the weather record for all four locations for the specified date. Once selected, this option should repeat allowing the user to enter in another date.

b. Averages: The user should be able to select a data value (High Temp, Low Temp, Average Wind, Max Wind, and Precipitation) for which they want to see the averages printed for each month for each location. Once selected, this option should repeat allowing the user to enter in another data value. All resulting averaged values should be displayed to only four decimal places.

c. Maximums: The user should be able to select a data value (High Temp, Low Temp, Average Wind, Max Wind, and Precipitation) for which they want to see the maximum amounts printed for each month for each location. This option should repeat allowing the user to enter in another data value. If Precipitation is selected, the resulting values should be displayed to only two decimal places.

d. Minimums: The user should be able to select a data value (High Temp, Low Temp, Average Wind, Max Wind, and Precipitation) for which they want to see the minimum amounts printed for each month for each location. This option should repeat allowing the user to enter in another data value. If Precipitation is selected, the resulting values should be displayed to only two decimal places.

e. Total Precipitation: The user should be able to select a location and see the total rain fall for each month over the entire year. This option should repeat allowing the user to enter in another location. All resulting totaled values should be displayed to only two decimal places.

f. Extremes: The user should be able to select a location and see the extreme values for each of the following data values: show the highest High Temp recorded (and the date it occurred), the lowest Low Temp recorded (and the date it occurred), the highest Max Wind recorded (and the date it occurred), and the largest amount of Precipitation recorded (to two decimal places) (and the date it occurred) for the specified location. This option should repeat allowing the user to enter in another location.

4. All data values should have "get" and "set" methods for storing and accessing the data values of the class.

To do this, you need to program a Weather Processing System using solid object oriented programming methodologies.

Reference no: EM131936592

Questions Cloud

Stock and investing in the bond of a corporation : What is the difference between investing in the stock and investing in the bond of a corporation? Which one is the less risky investment and why?
What is the companys cost of capital : What is the company's cost of capital? What is the appropriate discount factor for you to use in evaluating the bus project? Identify and define the formulas.
Price of stock on ex-dividend date if dividend is declared : What will be the price of the stock on the ex-dividend date if the dividend is declared?
What was the loss to hilton due to underpricing : The offer price was $20.00 per share and the closing price at the end of the first day was $21.50. The firm issued 117.6 million shares.
How one class uses another class elegantly : How to find out what these classes are through the online Application Program Interface (API). How one class uses another class elegantly!
What is your contribution per unit : Assume you have decided to buy an advertisement in the local newspaper to publicize your new photography business. The cost of the ad is $6700.
Proceeds for the issuer and the underwriter : The underwriter's spread is 7%. What were the proceeds for the issuer and the underwriter?
Design scientific investigations : Design a method to investigate the change. Remember to include a minimum of five trials in every independent variable group
Which of the initiatives should the company pursue : Calculate the NPV, discounted payback period, and IRR for each initiative. Which of the initiatives should the Company pursue, and why?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write and test an html document that describes a list

Write and test an HTML document that describes an unordered list of at least five popular books. The bullet for each book must be a small image of book's cover.

  Design the instruction formats using class code method

There are three classes of instructions in an instruction set (two-address, one address, and zero-address). All instructions must be 32 bits long.

  Calculate the efficiency of transmission at data link layer

Calculate the efficiency of transmission at the data link layer. Assume no options for IP header and Ethernet-II format are used at the data link layer.

  Review the different digital forensics tools and hardware

From the second e-activity describe two devices that are available from leading computer manufacturing companies

  Calculate and show the mortgage payment amount

Write down the program in Java (with a graphical user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage, the term of the mortgage, and the interest rate of the mortgage. Allow th..

  The network connection works fine devoid of errors the

an organizations head office is connected to its branch office over the internet. the network connection works fine

  Create a directory structure for a new accountant

Create a summary document  describing how the knowledge, skills and attitudes learned in this will  apply to your chosen career - Create a directory structure for a new accountant that is organized to  house the following items

  Explaining the rsa

Using the RSA with p = 3, q = 11, e = 7: Explain the suitable value for d? Encode the message “cat” by encrypting each letter separately, i.e., by encrypting ASCII code of each letter.

  Make short story consisting of several of these sentences

Write down an application that uses random-number generation to create sentences. Use four arrays of strings called article, noun, verb and preposition.

  Determine average temperature on surface of circuit board

A 12-cm-high and 20-cm-wide circuit board houses 100 closely spaced logic chips on its surface, each dissipating 0.05W.

  Calculate the slope and length of sides

Write a program that calculates the slope and length of sides and the perimeter of a rectangle given four of its vertices as ordered pairs (x,y).

  Define design and consultancy services

A description of proposed virtual infrastructure for the data centre including which virtual technology is recommended and the reasons for that recommendation.

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