Is the process in which one object can acquire the properties and Behaviour of the?

Inherit Definition - Derive quality and characteristics from parents or ancestors. Like you inherit features of your parents.

Example: "She had inherited the beauty of her mother"

Inheritance in Object-Oriented Programming can be described as a process of creating new classes from existing classes.

New classes inherit some of the properties and behavior of the existing classes. An existing class that is "parent" of a new class is called a base class. New class that inherits properties of the base class is called a derived class.

Inheritance is a technique of code reuse. It also provides the possibility to extend existing classes by creating derived classes.

Inheritance Syntax
The basic syntax of inheritance is:

 class DerivedClass : accessSpecifier BaseClass

Access specifier can be public, protected and private. The default access specifier is private. Access specifiers affect the accessibility of data members of the base class from the derived class. In addition, it determines the accessibility of data members of the base class outside the derived class.

Why do we model?

In Object Oriented Programming we are trying to model either real world entities or processes and represent them in software. There are compelling reasons why we model:

  • A model is a simplification of reality. We model because we cannot comprehend the complexity of a system in its entirety.
  • We model to visualize, specify, construct, and document the structure and behavior of a system's architecture.
  • A model is a complete description of a system from a particular perspective.

Principles of Modeling

The model that we create is dependent on the problem that we are trying to solve and the entities in the scope of the problem.

  • The choice of what models to create has a profound influence on how the problem is attacked and how a solution is shaped.
  • Every model maybe expressed at different levels of precision.
  • The best models are connected to reality.
  • No single model is sufficient. Every non-trivial system is best approached through a small set of nearly independent models.

Basic Principles of Object Orientation

  • Abstraction: the most important or essential aspects of something while ignoring the less important details. Abstraction is dependent on perspective - what is important in one context may not be in another. We model our problem domain using abstractions.
  • Encapsulation: physical localization of features into a single blackbox abstraction that hides their implementation behind a public interface. "Information hiding" is a corollary concept that indicates data fields are hidden from the user but the functionalities as implemented through functions are exposed.
  • Inheritance: organization of abstractions according to some order (e.g. complexity, responsibility, etc.).
  • Polymorphism: substitute variables or objects of one type with variables or objects of another type. Polymorphism gives us the ability to switch components without loss of functionality.

Basic Concepts of Object Orientation

  • Object
  • Class
  • Attribute
  • Operation (Function)
  • Polymorphism

What is an Object?

An Object represents an entity either physical (box), conceptual (chemical process), or software (list).

An Object is a concept, an abstraction, a thing with sharp boundaries and meaning for an application. It has

  • Identity - a name
  • State - determined by the values of its attributes
  • Behavior - determined by how the object acts or reacts to requests (messages) from other objects

An Object is represented as a rectangle with a underlined name in UML.

What is a Class?

A Class is a description of a group of objects with common properties (attributes), behavior (operations), relationships, and semantics

A class is an abstraction. An object is an instance of a class.

Example of a Class

  • Class: Course
  • Properties: Name, Location, Days Offered, Credit Hours, Professor
  • Behavior: Add Student, Delete Student, Get Course Roster, Determine If Full

A class is represented by a compartmentalized rectangle in UML. It has three sections - Name, Attributes, and Operations. You can show as many or as few of the Attributes and Operations in the diagram. Most of the times for the sake of clarity the Attribute and Operation lists are suppressed.

You start from real world objects - abstract out what you do not care and go through the process of classification of what you care. A Class is the result of this classification. Classes are then used as templates within a software system to create software objects.

What is an Attribute?

An Attribute is a named property of a class. It has a type. It describes the range of values that that property may hold.

What is an Operation (Function)?

An Operation is a service that can be requested from any object of the Class to affect behavior. An Operation can either be a command or a question. A question should never change the state of the object only a command can. The outcome of the Operation depends on the current state of the object.

What is Polymorphism?

The Greek term polymorphous means "having many forms". Interfaces allow us to define polymorphism in a declarative way. Two elements (classes) are polymorphic with respect to a set of behaviors if they realize the same Interface. Interfaces allow us to build a "plug-and-play" architecture. Classes that realize the same Interface may be substituted for one another in the system, thereby changing the implementation without affecting the User.

What is the process in which one object can acquire the properties and Behaviour of the parent object?

Explanation: 'Inheritance' is the mechanism provided by Object Oriented Language, which helps an object to acquire the properties of another object usually child object from parent object.

What is the process by which one object can acquire the properties of another object?

Inheritance is when an object acquires the property of another object.

What is the process by which object of one class acquires the properties of object of another class *?

Object of one class acquire property of object another class, this process is known as Inheritance. The mechanism of deriving a class from another class is known as Inheritance. Explanation.

Can be defined as the process where one class acquires the properties?

Inheritance can be defined as the process where one class acquires the properties (methods and fields) of another. With the use of inheritance the information is made manageable in a hierarchical order.