#include using namespace std; #include "lab1class.h" void print_astro_stats(astronaut &a){ cout << "Name: " << a.name << endl; cout << "Age: " << a.age << endl; cout << "Flights: " << a.flights << endl; cout << "Status: " << (a.alive? "Alive":"Dead") << endl; } int main(){ astronaut nigel("Nigel"); cout << "Nigel is 26: " << nigel.age << endl; cout << "Nigel's name is Nigel: " << nigel.name << endl; while(nigel.alive){ nigel.fly(); } cout << "Nigel is dead\n"; print_astro_stats(nigel); astronaut beatrice("Beatrice"); while(beatrice.alive){ beatrice.fly(); } if(beatrice.flights > nigel.flights) cout << "Beatrice has beaten the record set by Nigel! New record is " << beatrice.flights << endl; return 0; }