Answered step by step
Verified Expert Solution
Link Copied!

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. (4 marks)
(b) Create two classes named as:
and
object of
student protected:
int id
int marks
public:
void setdata(int 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 display_result().

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions