Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( a ) Explain diagrammatically any four forms of inheritance in Object Oriented Programming give syntax for each form. ( 4 marks ) ( b
a Explain diagrammatically any four forms of inheritance in Object Oriented Programming
give syntax for each form. marks
b Create two classes named as:
and
object of
student protected:
int id
int marks
public:
void setdataint x int y: to initialize the
id and marks.
result public:
void display result: to display the data
of parent class
Use single inheritance in public mode to derive the parent class. In main create the
result class and access the member function setdata and displayresult
Step 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