// DIVE2.CPP - Dive class implementation. #include "dive.h" #include // Constructor. Dive::Dive( float avg, float diff ) { judgeScore = avg; difficulty = diff; } // Display the Dive on the console. void Dive::Display() { cout << "[Dive]: " << judgeScore << ',' << difficulty << ',' << TotalPoints() << endl; } //............................................. // Main test program int main() { Dive D1( 8.5, 3.0 ); // create 3 dives Dive D2( 9.0, 2.5 ); Dive D3( 8.0, 3.3 ); D1.Display(); // display 3 dives D2.Display(); D3.Display(); D2.Difficulty( 2.7 ); // modify difficulty D2.Display(); // redisplay return 0; }