Question: C++ Implement a class named Age; Class Age has the method named ReadFile to read the file input_age.txt; the values in the file contains in

C++

Implement a class named Age; Class Age has the method named ReadFile to read the file input_age.txt; the values in the file contains in each line: first name, last name, age.

Create in the Class Age a method named CatchAge used to extract only the age from each line from the input.txt file.

In Class Age, create the method ReckonAge, used to get the sum and the average of all the ages found in the input file

In Class Age, create the method Output used to print on the screen and also into the file output.txt each of the ages found in the input.txt and also the total sum of all ages and average age; then make the greetings: (average <= 50) YOUNG GROUP, (average >50 and <100) GOOD AGE GROUP, (average >=100) TELL THE SECRET;

input.txt is:

Mark Cyprus 21 Elizabeth Monroe 45 Tom McLaugh 82 Laura Fairs 3 Paul Dantas 102

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!