Computer Science, asked by mbilalraza400, 1 month ago

A parent class named A has an integer data member 'm' and a method named 'printNum' to print the value of 'm'. Its child class named B also has an integer data member 'n' and a method named 'printNum' to print the value of 'n'. Make an object of the child class B and use it to assign a value of 'n' to 'm'. Now call the method 'printNum' by this object.

Answers

Answered by pushpadevi69244
0

Explanation:

wbx ucqlt yoe eshzg ozbfys fozfr

Answered by saifalam000000678
2

Answer:

A parent class named A has an integer data member 'm' and a method named 'printNum' to print the value of 'm'. Its child class named B also has an integer data member 'n' and a method named 'printNum' to print the value of 'n'. Make an object of the child class B and use it to assign a value of 'n' to 'm'. Now call the method 'printNum' by this object.

Similar questions