HCL
Company
Programming
Mary is making a database of animals in a zoo and their properties. The possible
animals are dog, lion and zebra. Each one has as attributes isHerbivorous, colour and
isNocturnal. She uses the object oriented programming paradigm for this. How will she
conceptualize the system?
(a) class: Animal; objects: dog, lion and zebra; data members: is Herbivorous, colour and is
Nocturnal
(b)class: Animal; objects: is Herbivorous, colour and is Nocturnal; data
members: dog, lion and zebra
(c)classes: dog, lion and zebra; objects: Animal; data members: is Herbivorous, colour and is
Nocturnal
d)None of these
Read Solution (Total 2)
-
- Ans a)class: Animal; objects: dog, lion and zebra; data members: is Herbivorous, colour and is
Nocturnal
class is a template(logical entity) , objects are instances of class(real entity). - 9 years agoHelpfull: Yes(9) No(1)
- (a) class: Animal; objects: dog, lion and zebra; data members: is Herbivorous, colour and is
nocturnal - 8 years agoHelpfull: Yes(0) No(0)
HCL Other Question