Question: Define a struct called Course that has the components code, title, grade (of type string credit, and cost (of type integer). Define a struct called
Define a struct called Course that has the components code, title, grade (of type string credit, and cost (of type integer). Define a struct called Finance that has the components type (of type string), and amount of type integer) Define a class called Student that has private members id, name, numberOfCourses, the array listoCoursex[30] of struct variables of type Course, mumberOfFinances of type integer the array lisOfFinances[5] of struct variables of type Finance, and GPA of type float. The class also has the public members selfstring, string. prin), calculateGPAO. findFinance), and a default parametriced constructor with default values "12345678" and "Omar Ali" as the student id and name To calculate the tuition fees of cach course, multiply the number of credits by the cost of that course Save the two streets and the class definitions in the file Studenth Implement the member functions of the class in the file Studentim.cpp Save the following driver in the file Student.cpp int main Student on one print: one.set("87654321". "Ali Omur"); onc.print(): return 0; reading the following data from the files Courses.txt and Finance.txt Courses Ex! Finance 1501116 Programming I. C+ 4 890 Expenditures 3500 1501211 Programming II. B 3 910 Accommodation 5400 1501115 Data Structures. D+ 3 900 Medical 300 1501365 Advanced Database Systems, 3 950 produces the following output: 87654321 Ali Omar toke the following courses: 1501116 Programming ! 4 890 1501211 Programming II 3 910 1501115 Data Structures 3 900 1501365 Advanced Database Systems 3 950 The GPA was 2.26923 at a cost 21040 dirham
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
