Question: answer is required in course.cpp ONLY and in c++ please File is marised at read only Curnent fie Studenticpp * 1. ainclude stugent ah* Whistadent





File is marised at read only Curnent fie Studenticpp * 1. ainclude "stugent ah* Whistadent clasis constructer Student: istudent (atring first, string last, duable g.p9) ( this.biest = firsti / first nave this olast - lasti fast nand this-segi - poai. i grasie poinc oneroge double studeatitietaps() I feturn pa; string stadentifietLast() ( retarn lasti (1) 1 18. String student thetrirst() Run your paogram as often as youd lae, before submiting for grading. Befow, type ary neeved input values in the first box, then click Run program and otserve the programs output in the file is marked as read only Curtent file Student h : 1. aifnetof stuotNr_- adeline STLOERT in WInctude atring? usink nanespoce ste; U/ riass rearesent ing a student class student ? poblict Student(string first, string last, double eppa): double tetuen() string Getcast(); string (eetirst )1 aelvate: String firsti // flest nom strine last; / last nase double epd; // grade point average Run your programtis often as youdd lke, before submitting for grading Behow, type any reeded input valueg in the first box, then click Run program and observe the procram's ousput in the second box file is morkevi as read only. Current file: main. cpp 1 Winclude. ciostream? 2. ainclude sionanipy i isinelude sstring? antinclude "Courst.h" usinit nabestace std; int main() ciarse course? strinp fmane; string liames strine loge: P exanpate studeats for testing cour'se. Addstudent\{student (Flienry", "Nguyen", 3.5.) course. Addstudent (student ( renda", istern", 2,0)): course. Addstudent (studeac ("lynda", "isobisan", 1,2)) b coursere.Addstudent (student (FSorye", "king", 3.9)) : File is marked as read only Currerit fole Course.h - 1) anifndef coumtse H adefine CoURSE H. Anc lude cvectors winclude "student.h" class cour ie if publict. st udent randst udertrighestcpa(): veid Addst udent (student s) b privated vectorcstudent> roster; /lolbection of student objects 14 If 15 Lit Nendl 1 Winclude clostream? irinclude "Course.h" using namespace std; Student course: findstudentuighest 6pa() I " Jype your code here */ void course: Adastudent (Student s) (0) 10. roster.push back(s); 11 II 15.36 LAB: Find student with highest GPA Complete the Couse ciass by inglementing the Findstudenthinhestona0 momber function which ifetaites thes stivent cojed with the highez GPA in the courbe Assume that no two studente hawe the tarne highest GPA Grinis clasises - Class colsse represents a courge whichicontans a vector of Student objects as in courte rosten (Tyoe your code in hite) GetGPA() telums a students CPA) Note For loating purpasos, difermt atudent volues will te ined Ex. for thio folowing tsudenis: Meney Hquyan 3+6 Dininda sterti 2.0 Lynida rotiluon 1.2 Jonya Kinis 3.9 tha oulput is Top ocginata zonya king torad ation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
