Question: c + + coding please , Define an enumerated type called Year that contains FRESHMAN, SOPHOMORE, JUNIOR and SENIOR ( values 0 - 3 )

c++ coding please , Define an enumerated type called Year that contains FRESHMAN, SOPHOMORE, JUNIOR and SENIOR (values 0-3).
Define a Student structure that contains three members : name (type string), age (type integer) and year (type Year)
The two methods that you will write are :
1) printStudent takes one argument that is a Student and returns void.
Print out the student information in the following format:
Name :
Age :
Year :
2) findByYear takes an array of Student structures, an integer that is the size of the array, and a Year as parameters. Return the number of Students that are of the the same class year as the input parameter Year.
For example, if the input array contains the following data:
{{"Rachel Green",17,SOPHOMORE},{"Monica Geller",16,FRESHMAN}}
calling findByYear (, FRESHMAN) returns 1 because there is only 1 FRESHMAN in the array.

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!