This program is a simple Java application that classifies earthquakes based on their magnitude according to the Richter scale. It prompts the user to input the magnitude and then determines the appropriate classification.
- User-friendly interface: Users can easily input the magnitude of the earthquake.
- Classification based on Richter scale: The program categorizes earthquakes into various classes based on their magnitudes.
- Easy to understand: The code is well-commented and structured, making it easy to understand and modify.
To run this program locally, follow these steps:
- Ensure you have Java installed on your system.
- Clone this repository to your local machine.
- Open the project in your preferred Java IDE.
- Compile and run the
EarthquakeClassifier.java
file.
- Run the program.
- Enter the magnitude of the earthquake when prompted.
- The program will output the classification of the earthquake.
The program follows a simple algorithm to determine the classification of the earthquake based on its magnitude:
- Prompt the user to input the magnitude.
- Based on the magnitude range, classify the earthquake.
- Print the classification.