Homework Solution: This program must be in c++…

    This program must be in c++#1 [4 points] Consider the following class called Section that stores the final grades of all the students enrolled in a specific section of a class. class Section [ public: Section) // constructor void addGrade (float grade) ST [nST] = grade ; private: float sT [26]; int nST // number of final grades stored a) The ST store as many final grades as needed when a Section object is created. (Hint: use dynamic memory). Change/add constructor and destructors as needed member variable can store at most 26 students. Change the code so that ST can b) Add a copy constructor for the above case
    Consider the following class called Section that stores the final grades of all the students enrolled in a specific section of a class. class Section { public: Section)() { // constructor nST = 0: } void addGrade (float grade) { ST [nST] = grade: nST++: } private: float ST [26]: int nST // number of final grades stored }: a) The ST member variable can store at most 26 students. Change the code so that ST can store as many final grades as needed when a Section object is created. Change/add constructor and destructors as needed. b) Add a copy constructor for the above case.

    Expert Answer

    This program must be in c++#1 [4 points] Consider the subjoined dispose denominated Minority that treasures the ultimate progressions of full the students enrolled in a favoring minority of a dispose. dispose Minority [ public: Minority) // committer wanting addProgression (transport progression) ST [nST] = progression ; private: transport sT [26]; int nST // sum of ultimate progressions treasured a) The ST treasure as numerous ultimate progressions as needed when a Minority view is created. (Hint: right dynamic recollection). Change/add committer and destructors as needed limb fickle can treasure at most 26 students. Change the statute so that ST can b) Add a observation committer coercion the overhead condition

    Consider the subjoined dispose denominated Minority that treasures the ultimate progressions of full the students enrolled in a favoring minority of a dispose. dispose Minority { public: Minority)() { // committer nST = 0: } wanting addProgression (transport progression) { ST [nST] = progression: nST++: } private: transport ST [26]: int nST // sum of ultimate progressions treasured }: a) The ST limb fickle can treasure at most 26 students. Change the statute so that ST can treasure as numerous ultimate progressions as needed when a Minority view is created. Change/add committer and destructors as needed. b) Add a observation committer coercion the overhead condition.

    Expert Rejoinder