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 are usually imperceptible.
- those with magnitude seven and over can cause serious damage over large areas.
National seismological observatories record earthquakes that occur.
Problem specification
Define Data Structures and Functions to store and retrieve information about the magnitude, position (latitude and longitude) and year of the event.
- 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)
- a list of Earthquake events that it has recorded
- 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
Provides access to information about all observatories.
- 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 given number
Present the user with a menu (printed to the console) of features:
- enter observatory data
- enter earthquake data
- provide monitoring statistics on:
- largest average earthquake
- largest earthquake ever
- all earthquakes with magnitude greater than a given number
- exit