// main3.cc g++ main3.cc NamedAcct.cc Account.cc // illustrates the use of NamedAcct objects derived from Account #include "NamedAcct.h" #include #include main () { std::cout << "Enter the account owners s.i.n. followed by " << "lastname and then first name:"; long sin; std::string last, first; std::cin >> sin >> last >> first; NamedAcct mine( sin, last, first); // creates an object and executes the ctor for both the base // and derived classes mine.deposit (500); mine.status (); // should show balance of 500 std::cout << "Enter the another s.i.n. followed by " << "lastname and then first name:"; std::cin >> sin >> last >> first; NamedAcct yours (sin, last, first, 100); // the 100 is passed to the base ctor yours.withdraw (50); yours.status (); } // objects destroyed here