Fantasy F.

asked • 08/23/21

Complete the C++

Answer must be in C++ format and using #include<iostream>


a)Create a class called Student

b)Declare a private data member: string name, int age, char gender

c)Define a mutator and accessor function ( for all data members)

d)Create non member function int calcualteYear(int a) - to calculate age for next 5 years.


Main Function

------------

a) create object S1 of class Student

b) get input for name, age and gender

c) calling setter

d) calling getter to display value name, age and gender inside Main Function

Display name, age and gender

e) calling function calculateYear and display age after 5 years.

1 Expert Answer

By:

Patrick B. answered • 08/23/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.