Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 :
printStudent takes one argument that is a Student and returns void.
Print out the student information in the following format:
Name :
Age :
Year :
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",SOPHOMOREMonica Geller",FRESHMAN
calling findByYear FRESHMAN returns because there is only FRESHMAN in the array.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started