Java program to store temperatures in two-dimensional array

Assignment Help JAVA Programming
Reference no: EM1370757

Write a Java program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. The program should output the average high,average low, and highest and lowest temperatures of the year. Your program must consist of the following methods:

getData- this method reads and stores the data in the two-dimensional array.

averageHigh- This method calculates and returns the average high temperature of the year.

averageLow- This method calculates and returns the average low temperature of the year.

indexHighTemp- This method returns the index of the highest temperatures in the array

indexLowTemp- This method returns the index of the lowest temperature of the array.

For this problem, you should provide two options for the user:
(1) To read data (i.e. the pair of input numbers) from a file, and then send results to a file
(2) To read data from the command line, and display results on the screen
(3) These options should be provided as a GUI dialog box, for example using the JOptionPane class.

Reference no: EM1370757

Questions Cloud

Concept of monopoly welfare loss : Compute the profit maximization level of activity. Compute  total revenue, total cot and profit or loss at profit maximization level of activity. Compute elasticity of demand at profit maximization. Compute the breakeven level of activity.
Find the total amount of cash reserves : Suppose the public in Nealland does not hold any cash. All commercial banks, however, hold 5 percent of their checking deposits as excess reserves, regardless of the interest rate.
Explain what does silence during communication indicate : Explain What does silence during communication indicate to you personally and How is your culture's use of silence connected to Hall's cultural patterns of low and high context
Most important factor to teach things : Upbringing is a factor that "burns with fire" in us to teach things that we are going to keep in the future. Explain
Java program to store temperatures in two-dimensional array : Write the Java program which uses two-dimensional array to store highest and lowest temperatures for each month of the year. Program must output average high,average low,
Compute the minimum amount of energy : Let the x axis be parallel to the ground, +y direction be vertically upward, and take as an origin the point on the ground directly below the top of the ramp.
Find firm profit-maximizing price and quantity : Find firm's profit-maximizing price and quantity. Illustrate what is profit. firm's production manager claims that firm's average cost of production is minimized at an output of 40 units.
Question related to training : How can an organization impart training to users on the analytical and proper utilization of data in a Decision Support System? Please explain.
Calculate required reserve ratio : Karen has kept her entire life savings, $50,000, in a floor safe underneath her bed. This morning, she make a decision to deposit her savings in a checking account at Cambridge Bank.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Sorted list adt and the binary search tree adt

Explain the differences between our specifications of the Sorted List ADT and the Binary Search Tree ADT.

  Methods

Assignment describe the basic working of methods. How to write a method in java and how to call a method.

  Java program for real estate agent

Write down java program for real estate agent. Program must perform the following tasks: ask users for average house price for the each of past 5 years for single family residence of 1500 square feet.

  Describe principles of data abstraction and inheritance

Study the principles of data abstraction, inheritance and dynamic binding. Use Library to get started on finding resources.You must take the terms and describe it.

  A jsp expression can contain any java expression

A JSP expression can contain any Java expression that evaluates to a

  Write program in java-calculate and display mortgage payment

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

  Write a java program using array to auto-grade exams

Write a JAVA program using 2D Array to auto-grade exams. For a class of N students, your program should read letter answers (A, B, C, D) for each student.

  Solving programming problems

Write a computer program that will figure out the total of an order when given the amount of the order ($1000) and a sales tax rate of eight percent.

  Determine if strings are equal

Complete the recursive method match in the code below which will determine whether or not two strings match.

  Distributed systems

Build robust, secure distributed systems using advanced programming techniques

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Write a program to register students for a college

Students have names, addresses and courses. Implement the interface class RegisterStudent. RegisterStudent has one method, public boolean register, which returns the boolean value of true or false if the student is successfully registered for the ..

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