#include "PointT.h" #include "BankAccount.h" #include "DataSetTemplate.h" #include <iostream> using namespace std; typedef DataSetTemplate<PointT> DataSetPointT; typedef DataSetTemplate<BankAccount> DataSetBankAccount; int main() { //Test Data Set Inteface with PointT PointT p1(0.0, 0.0); PointT p2(3.0, 4.0); PointT p3(7.0, 24.0); PointT p4(5.0, 12.0); DataSetPointT ds; ds.add(p1); ds.add(p2); ds.add(p3); ds.add(p4); cout << "average = " << ds.getAverage() << "\n"; cout << "maximum = " << ds.getMaximum() << "\n"; //Test Data Set Inteface with Bank Account BankAccount b1; b1.deposit(300); BankAccount b2; b2.deposit(100); DataSetBankAccount dsBank; dsBank.add(b1); dsBank.add(b2); cout << "average = " << dsBank.getAverage() << "\n"; cout << "maximum = " << dsBank.getMaximum() << "\n"; return 0; }