Answered step by step
Verified Expert Solution
Question
1 Approved Answer
solve this in c++ with complete detail and comments. 2. No. 1 > a) Write a main function which can define objects on run time
solve this in c++ with complete detail and comments.
2. No. 1 > a) Write a main function which can define objects on run time of two different classes, ClassEven and ClassOdd, take input from user, if user inputs an even number the program should define an object of ClassEven and if user inputs an odd number the program should define an object of ClassOdd. (5 Marks) b) Write a function which can determine which object to create when a value is passed to it, it should define an object of class A, B and C, when '1', '2', and '3' is passed respectively Return the address of created objectStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started