Answered step by step
Verified Expert Solution
Link Copied!

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 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

Perform the indicated operations. 2(3r 2 + 4r + 2)3(r 2 + 4r 5)

Answered: 1 week ago