Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ coding please The following diagram illustrates the classes you will implement in this lab and their relationships. Course -name: string -mark: int + default

C++ coding please image text in transcribed
image text in transcribed
The following diagram illustrates the classes you will implement in this lab and their relationships. Course -name: string -mark: int + default constructor parameterize constructor) -getters() *setters Student #courses[3] : Course -name : string -id: int +parameterized constructor) setters) getters() *printDetailes():void ITStudent -department : string -year: int + default constructor parameterized constructor() +getters() setters() printDetales():void -calculateGPA(): double NOTE 1: In all of your code, do not forget to validate all user input and to make all functions that do not modify the class as constant. Id must be between 100 and 300. Course mark must be between 35 and 100. Year in ITStudent must be between 1 and 7. NOTE 2: Do not put all of your code in one file; separate implementation from the interface. For this assignment you need to submit a header and an implementation file for the 3 casses (6 files) and one main program file. The total is 7 files. NOTE 3: Avoid duplication of code! If something is already done in the base class, do not do it again in the derived class. QUESTION 1: (20 points) Implement Class Course as described in the UML diagram above. QUESTION 2: (30 points) Implement Class Student as described in the UML diagram above. Notice that unlike all its data members, courses array is protected and not private in this class. QUESTION 3: (40 points) Implement class ITStudent, which inherits from class Student. Note the following: Function printDetails of the base class should be overridden to print the additional information about the department name and year. QUESTION 4 (20 points); Implement a driver program to test your code. Create an object of type ITStudent, call it itStudent using the parameterized constructor .print itStudenti details. Create an object of type Student call it student 1, using the parameterized constructor -print studenti details. - Calculate the GPA of itStudenti - if you use private instead of protected for courses array, would you be still able to implement calculateGPA in ITStudent class? Why or why not? Answer this part as a comment in your main

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

Step: 3

blur-text-image

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

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

What were some of the team norms at Casper?

Answered: 1 week ago

Question

=+ What would it look like? Who should deliver it?

Answered: 1 week ago