Write a C++ program that creates a class Mathematician with the data members such as name, address, id, years_of_experie

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a C++ program that creates a class Mathematician with the data members such as name, address, id, years_of_experie

Post by answerhappygod »

Write a C++ program that creates a class Mathematician with the
data members such as name, address, id, years_of_experience and
degree and create an array of objects for this class.
Include public member functions to
i) Input() – This function should read the details
of an array of Mathematicians by passing array of objects and array
size (n)
ii) Display() – This function should display either the
details of an array of Mathematicians or a Mathematician with
highest experience by passing array of objects, array size (n) and
user’s choice (1 or 2) as the argument to this function.
Note:-
Write the main function to
Create an array of objects of Mathematician based on the user’s
choice (get value for the local variable ‘n’ and decide the size of
the array of objects)
Input details into the array of objects.
Finally, either display the complete set of Mathematician
details or display the details of Mathematician with highest years
of experience based on the user’s choice.
(1 – display the complete set of Mathematician
details)
or
(2 – display Mathematician with highest experience details
only)
You may decide the type of the member data as per the
requirements.
Output is case sensitive. Therefore, it should be produced as
per the sample test case representations.
‘n’ and choice should be positive only. Choice should be either
1 or 2. Otherwise, print “Invalid”.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply