public:
/// <summary>
/// Responsible for calculating the magnitude of earthquakes!
/// </summary>
double CalculateEnergy(Earthquake* quake) {
quake->energy = (2.5 * pow(10, 4)) * pow(10, (1.5 * quake->magnitude));
return quake->energy;
}
/// <summary>
/// Responsible for calculating the difference in intensity between two earthquakes!
/// </summary>
double CalculateIntensityDifference(Earthquake* quake1, Earthquake* quake2) {
double magnitude_Difference = (quake1->magnitude - quake2->magnitude);
double diffIntensity = round(pow(10, magnitude_Difference));
quake1->intensity = quake2->intensity = diffIntensity / 2;
if(quake1->magnitude > quake2->magnitude)
std::cout <<"Earthquake #1 Intensity:: " << quake1->magnitude << " was approximately " << diffIntensity << " times stronger than Earthquake #2 Intensity:: " << quake2->magnitude << std::endl;
if (quake1->magnitude < quake2->magnitude)
std::cout << "Earthquake #2 Intensity:: " << quake2->magnitude << " was approximately " << diffIntensity << " times stronger than Earthquake #1 Intensity:: " << quake1->magnitude << std::endl;
return diffIntensity;
}
};