Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C++ using codeblock. Here are the files, there just empty .cpp files with the co

ID: 3564190 • Letter: C

Question

C++ using codeblock.

Here are the files, there just empty .cpp files with the correct preprocessor directives included in them. I also provided you with a complete main.cpp file

www.dropbox.com/s/hj499cqjg0gorhv/Asst3Files.zip?dl=0

This assignment will deal with inheritance and derived classes in C++. The base class student will be implemented and then two other classes undergrad and grad will created where undergrad will inherit for the student class and grad will inherit from the undergrad class. The classes will be implemented according to the following UML diagrams: student + student(string, int) + get _name() const: string + get _id() const: int # credits: int # gpa: double - name: string - id: int undergrad : student + undergrad(string, int) + add _credits(int = 0, int = CREDITS_NEEDED, double = GPA_NEEDED): void + set _gpa(double): void + print() const: void # graduated: bool - CREDITS_NEEDED : static const int (set to 127) - GPA_NEEDED : static const double (set to 2.5) grad : public undergrad + grad(string, int) + add _credits(int = 0, int = CREDITS_NEEDED, double = GPA_NEEDED): void + set _thesis(bool): void - thesis: bool - CREDITS_NEEDED : static const int (set to 30) - GPA_NEEDED : static const double (set to 3.0) Description of student class constructor will initialize the name and id with the parameters given to the constructor and will set gpa and credits to 0 get _name() will return the name field get _id() will return the id Description of undergrad class constructor will call the student class constructor and send its parameters to student class constructor and will set graduated field to false set _gpa(double) will set the gpa field with the parameter given add _credits(int inc _credits, int credits _required, double gpa _required) will be the 3 parameters with default values given in the UML diagram. The method will perform the following actions increment credits with inc _credits check if (credits >= credits _required and gpa >= gpa _required) is true, if it's true then set graduated field to true print() const will print out the name, id, credits, gpa, and whether graduated or not Description of grad class the constructor will call the undergrad constructor and send its parameters to the undergrad constructor and will set thesis and graduated fields to false add _credits(int inc _credits, int credits _required, double gpa _required) will be the 3 parameters with default values given in the UML diagram. The method will perform the following actions Will call the undergrad add _credits method and it will send its parameters to the undergrad add _credits method It will check if thesis field is false, if it's false, set graduated to false otherwise don't do anything set _thesis(bool) will take a boolean parameter and set that to the thesis field

Explanation / Answer

Since this is a homework, it is not morally right to give exact solution. However, observe the following code for exactly similar problem.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote