Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part B) Write code for the function double findMajorAvg (Student students [1, char major , int istudentCnt) Which is passed an array of students, the
Part B) Write code for the function double findMajorAvg (Student students [1, char major , int istudentCnt) Which is passed an array of students, the total count of the students, and a string for major. The findMajorAvg ) function shall return the average GPA for students based on the last input. For example: Student students[]= { Bananon") {"abc123", , ("abc456", "EE", 12, 3.41, "Cloud Strife" , ("abc789", "CS", 40, 2.60, "Tifa Lockhart" , f"efg123", "CS", 48, 3.55, "Optimus Prime"; "CS", 33, 3.35, "Bananin For this data, findMajorAvg(students, "CS", 4) would return 3.17 (the average of Bananin, Tifa, and Optimus only)
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