The human body has many organs (heart, lungs, brain, and kidney, to name a few). We could think of the human body as complex object made up of simpler objects (organ).
a) Create classes for heart and brain. Think about what the functions of the heart and brain are in our body and map these functions into methods.
b) Create an organ class as the base class for the organs and derive the classes created earlier from the base class.
inaxassan 0 Newbie Poster
gavinflud 14 Light Poster
inaxassan 0 Newbie Poster
gavinflud 14 Light Poster
Ene Uran 638 Posting Virtuoso
inaxassan 0 Newbie Poster
inaxassan 0 Newbie Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.