Join Telegram Channel for DXC exam Discussion & help!

A programmer 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?

Computer Programming MCQ Questions with Solutions

A programmer 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: is Herbivorous, colour and is Nocturnal; data members: dog, lion and zebra
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 Tree.
D) None of these
Answer & Description: A) class: Animal; objects: is Herbivorous, colour and is Nocturnal data members: dog, lion and zebra
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).

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.