Answer:
class studentType: public personType
{
public:
virtual void print() = 0;
virtual void calculateGPA() = 0;
void setID(long id) {
studentId = id;
}
void setCourses(const string c[], int noOfC) {
noOfCourses = noOfC;
for (int i=0; i<noOfCourses; i++) {
courses[i] = c[i];
}
}
void setGrades(const char cG[], int noOfC) {
noOfCourses = noOfC;
for (int i=0; i<noOfCourses; i++) {
coursesGrade[i] = cG[i];
}
}
long getID() {
return studentId;
}
string* getCourses() {
return courses;
}
char* getGrades() {
return coursesGrade;
}
studentType(string fName = "", string lastName = "",
long id = 0, string c[] = NULL, char cG[] = NULL, int noOfC = 0);
private:
long studentId;
string courses[6];
char coursesGrade[6];
int noOfCourses;
};
Explanation:
Code rewritten
Answer:
goku comes in and turns super sayain naruto come in with kurama and naruto get goku with a rasagen and geku is still fist fightin while naruto is using his kurama and turns into kurama and knocks out goku now naruto thinks he won and goku IS HITIN HIM WITH A KAMEKAMEHA GOKU IS SIROUS NOW
Explanation:
Answer:
Option(B) i.e "Merge sort " is the correct answer to the given question .
Explanation:
The merge sort follow the approach of divide and conquer technique .It means firstly it divided the given array into the sub parts that sub parts are sorted in comparing the first value with the adjacent value and perform selection sorting in them it means we swap the value if necessary. This process will continue until all the elements are checked .
- When the sub parts are arranged then we will combine them and getting the new or original array that is in sorted order.
- When we perform the merge sort the extra memory is used which is drawback of merge sort .
- All the other options are not Splitting the array in two parts and perform sorting so these are incorrect option .