1. Objectives
The objectives of this coursework are for you to demonstrate that you can:
Define classes, fields, constructors, and methods in Java
Use appropriate types, including collections
Implement basic algorithms using collections
Write a main method including console I/O
Devise appropriate test cases
Document your solution with javadoc
Note that at the time of setting the coursework, you will not have been taught all the
material relevant to this exercise (for example, main method, console I/O, testing). You may
need to research relevant Java Class libraries in order to get help with certain features.
2. Scenario: Earthquake monitoring
Earthquakes can have devastating effects when they occur, and although it is known that
they are more likely to occur in some places than in others they are almost impossible to
predict. In order to help scientists understand earthquakes better, an international
monitoring system is in place to record where earthquakes occur and how powerful they
are. Earthquake strength is measured by the magnitude moment: earthquakes of
magnitude three or lower usually imperceptible but those with magnitude seven and over
can cause serious damage over large areas. National seismological observatories record
earthquakes that occur, although different observatories were set up at different times, so
the period over which historical data is available varies from place to place.
3. Problem specification
Define a Java class Earthquake with appropriate fields, methods and constructor to store
and retrieve information about the magnitude, position (latitude and longitude) and year of
the event.
Define a Java class Observatory with appropriate fields, methods and constructor to store
and retrieve the name of the observatory, the name of the country in which it is located, the
year in which earthquake observations started, the area covered by the observatory (in
square kilometres) and a list of Earthquake events that it has recorded. Include methods to
return:
The largest magnitude earthquake recorded by the observatory.
The average earthquake magnitude recorded at the observatory.
A list of all earthquakes recorded at the observatory with a magnitude greater than
a given number.
Define a Java class Monitoring, which holds information about all observatories. Include
methods to return:
The observatory with the largest average earthquake magnitude.
The largest magnitude earthquake ever recorded.
A list of all earthquakes recorded with magnitude greater than a givennumber.
Define a class MonitoringIO, with a main method which does the following:
Presents the user with a menu (printed to the console) offeatures:
o enter observatory data;
o enter earthquake data;
o provide monitoring statistics on largest average earthquake, largest
earthquake ever and all earthquakes with magnitude greater than a given
number; or
o exit
Takes user input from the console to choose one of the menu features
Allows the user to input, via the console, the details of observatories and
earthquakes
After executing one of the features, returns the user to the menu to choose another
option
All classes should be properly documented with javadoc and include appropriate testing
methods.
Programming
[SOLVED] algorithm Java statistic 1. Objectives
$25
File Name: algorithm_Java_statistic_1._Objectives.zip
File Size: 357.96 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.