How you can relate Rose to OOPS. | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

How you can relate Rose to OOPS.

this question asked by interviewer. i was like šŸ‘šŸ™„

24th Dec 2016, 4:59 AM
himanshu yadav
himanshu yadav - avatar
1 Resposta
+ 1
take garden is a class and it has a fuction flowers and flowers has a fuction rose .(inheritance) rose is derived from flower and flower is derived from the garden. rose has different property like fragrance.(abstraction) and also it has layer by layer if combine (encapsulation). different different flower has its own property so u can relate with (polymorphism). plzz give me reviews.
24th Dec 2016, 8:52 AM
himanshu yadav
himanshu yadav - avatar