Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ it supposed to be 3 files Main which is (Student.cpp) and then the header student.h and the source StudentIMP.cpp Define a struct called Course

C++

it supposed to be 3 files Main which is (Student.cpp) and then the header student.h and the source StudentIMP.cpp

image text in transcribedimage text in transcribedimage text in transcribed

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, numberOlCourses, the array listQfCourses[30] of struct variables of type Course, numberOfFinances of type integer, the array listOfFinances[5] of struct variables of type Finance, and GPA of type float. The class also has the public members set(string, string), print(), calculate GPAO, findFinance0, and a default parameterized constructor with default values "12345678" and "Omar Ali as the student id and name. To calculate the tuition fees of each course, multiply the number of credits by the cost of that course. Save the two structs and the class finitions in file Studente Implement the member functions of the class in the file StudentImp.cpp Save the following driver in the file Student.cpp int main() { Student one; one.print(); one.set("87654321", "Ali Omar"); one.print(); return 0; } reading the following data from the files Courses.txt and Finance.txt Courses.txt 1501116 Programming I, 1501211 Programming II, 1501115 Data Structures, 1501365 Advanced Database Systems, C+ B D+ 4 890 3 910 3 900 3 950 Finance.txt Expenditures 3500 Accommodation 5400 Medical 300 produces the following output: 87654321 Ali Omar toke the following courses: 1501116 Programming I 4 1501211 Programming II 3 1501115 Data Structures 3 1501365 Advanced Database Systems 3 890 910 900 950 The GPA was 2.26923 at a cost 21040 dirham Finances.txt Expenditures Accommodation Medical 3500 5400 300 1501116 Programming I, 1501211 Programming II, 1501115 Data Structures, 1501365 Advanced Database Systems, C+ B D+ Courses.txt 4 890 3 910 3 900 950

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

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions