Object-oriented programming

Assignment Help Business Management
Reference no: EM131330184

Part 1: Object-Oriented Programming:

Class Day

1. Create a Java class called Day. The class should include three private fields for the year, month, and day.

2. Add setters and getters for the three private fields

3. Add a constructor that takes 3 arguments for: year, month, and day.

4. Add a public method called printDate(), which prints the date in the following format "MM/DD/YYY". Forexample, "02/18/2016"

Class DailyWeather

5. Create a second java class called DailyWeather. This class should extend Day.

6. Define a constructor that also takes 3 arguments: year, month, and day. Use the super(...) method to set thesevalues.

7. Add the following variables for the class DailyWeather:• maxTemp• minTemp• meanTemp• meanHumidity• maxWind• meanWind

8. Add setters and getters for all the variables above.

Part 2: File IO

1. Download the file "weather2015.txt". This file is a comma-delimited table that includes daily weatherinformation for the year 2015. The first line specifies the meaning of each column:

2. In a new Java class with a main method, create an ArrayList of type DailyWeather.

3. Read the file one line at a time, and for each day in the file, create a DailyWeather object with the valuesspecified in the file. When you are done reading the file, you should have 365 objects in your ArrayList.

4. Using a for loop, find which dailyWeather object has the highest meanTemp value. Print the datecorresponding to the hottest day in 2015. If there is more than one object with the same highest meanTempvalue, only print the first one.

5. Find and print the date corresponding to the most humid day in 2015

6. Find and print the date corresponding to the maximum wind speed (maxWind). What was the meantemperature in that day?

Reference no: EM131330184

Questions Cloud

Iterative and incremental process : 1. Describe sequence diagrams. Include in your discussion how to read them. What does a curved message call line do? 2. What is meant by saying that UP is an iterative and incremental process?
What qualifications do the listings have in common : Find at least five job postings for security administrators.- What qualifications do the listings have in common?- Did any of the listings include any qualifications that seemed unusual or different from what was expected?
Calculate the spin-orbit coupling constant for a 2p-electron : Calculate the spin-orbit coupling constant for a 2p-electron in a Slater-type atomic orbital, and evaluate it for the neutral atoms of Period 2 of the periodic table (from boron to fluorine).
Requirements for a windows installation : Put together a report that details the requirements for a Windows Installation. This should include both client and server with both the minimum and recommended requirements.
Object-oriented programming : 1. Create a Java class called Day. The class should include three private fields for the year, month, and day. 2. Add setters and getters for the three private fields. 3. Add a constructor that takes 3 arguments for: year, month, and day.
Calculate first-order correction to the zero-point energy : Calculate the first-order correction to the zero-point energy, and evaluate it for an electron in a box on the surface of the Earth. Account for the result
What clauses should a termination policy contain : What clauses should a termination policy contain to prevent disclosure of the organization's information? Create your own variant of either a hiring or a termination policy.
Examine your options and defend your position : Before you is a doctor who is being prosecuted for giving a lethal dose of morphine to a patient dying of terminal cancer. The family of the patient did not want the prosecution, the majority of the public is not in favor of the prosecution, but t..
How much should an organization spend : Select one at random and call to determine the costs of conducting such checks. How much should an organization spend on conducting these checks if it interviews dozens of potential employees?

Reviews

Write a Review

Business Management Questions & Answers

  Question about emotional intelligenceexplain emotional

question about emotional intelligenceexplain emotional intelligence. why does a leader need good emotional

  Conflict between industrialized and developing

conflict between industrialized and developing countriesconsider the conflict between industrialized and developing

  Notre dame-penn state football game

Suppose the demand for the Notre Dame-Penn State football game is given by:

  What are ethical ramifications of re-classifying investments

What are the ethical ramifications of re-classifying investments? Give an example of when reclassifying a long term investment as a short term investment makes financial sense for the company.

  Charge of coming up with customer satisfaction strategy

Select a company with which you are familiar. The company should have a sales force and customer service division. You are in charge of coming up with a customer satisfaction strategy to help the organization increase sales and customer satisfactio..

  How are you seeing the effects of that change today

What do you think was the most crucial change and how are you seeing the effects of that change today?

  The travels of a t-shirt in a global economy

The Travels of a T-Shirt in a Global Economy  The T-Shirt Finally Encounters a Free Market  Assignment Why does the US export used clothing? What caused the emergence of a used clothing export industry in the US?What is the "snowflake" factor in the..

  Determine its major strengths weaknesses and threats

Analyze the five forces of competition to determine how they impact the company. Create a SWOT analysis for the company to determine its major strengths, weaknesses, opportunities, and threats.

  Steps in the change management process

What are the 8 steps in the change management process? Identify 4 reasons why people resist change. Identify 3 strategies leaders can use to overcome resistance to change.

  Opportunity cost of producing

What is the opportunity cost of producing the first 15 Gizmos? What is the opportunity cost of producing the next 15 Gizmos (i.e., from 15 to 30)? What happens to the opportunity cost of Gizmos as their productions is continuously increased?

  Should a company''s accounting department be centralized

Why are corporate strategy and competitive strategy separated in diversified companies but not in single-business line companies? Do not define each. Why are they separated?

  International business communications

Your fast-food franchise has been cleared for business in all 4 countries (United Arab Emirates, Israel, Mexico, and China). You now have to start construction on your restaurants. The financing is coming from the United Arab Emirates, the materials ..

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