Question: Solve using Oop in c++ Note:Solve using oop in c++ Define a student class. A student has the following attributes: firstname, lastname, gender which can

Solve using Oop in c++

Solve using Oop in c++ Note:Solve using oop in c++ Define a

Note:Solve using oop in c++

Define a student class. A student has the following attributes: firstname, lastname, gender which can be male or female, status which can be equal to freshman, sophomore, junior, and senior and ep. Then define the following methods for the student class. The show_nyself method will simply print all the attribute variables when called upon the object. This method has no input arguments. The study_time method will increment the gps of the student according to the following formula: Epa = 2pz + 2og(study_tine)'. The only input argument of this method is the variable study_time. In addition make sure that the epa variable never exceeds 4.0 even if the student studies for a very long time. Now define 5 student objects and store the objects in a list called student_list. The five students are: Mike Barnes, Jim Nackerson , Jack Indabox , Jane Mller and Mary Scott. Mike is a freshman, Jim a sophomore, Jack a junior, Jane and Mary are seniors. Their respective GPAs are: 4.3, 2.5, 3.6 and 2.7. Make sure you assign the gender when you instantiate the objects Then call the show_myself method on all of them. I suggest you use a loop for making the objects and a separate loop for showing the objects. Use your objects from above and let each one of the 5 students study for 68, 169, 40, 300, 1808 minutes, respectively. So the first student studies 60 minutes, the second studies 100 minutes, etc. After that call the show_myself methods on all 5 again and check whether their new gpa reflects how much they studied

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!