Applied record case: return a whole assessment report

This is a second original invented practice case; its rules are not claimed to be the BITS course’s hidden case-study rules or assessment policy. Define Marks(theory,practical), Learner(id,name,marks) and Report(passed,top_id,top_score,total_score). Input is 0<=n<=6 followed by n rows id name theory practical. Ids are unique 1..999; names are tokens of 1..11 characters; both marks are 0..100. A learner passes only if BOTH marks are at least 40. Weighted score is theory+2*practical. total_score includes every learner, but the top record is chosen only among passers, with earliest input winning ties. If no one passes, top_id and top_score are -1. Write read-only value-parameter functions for score and eligibility, plus analyze(const Learner a[],int n) returning Report. Print each learner as id name PASS-or-FAIL weighted-score, then passed=P total=T top=ID score=S. Explain why a failed learner with a high weighted score cannot become top.


