answersLogoWhite

0

The possibility of legacy ground-breaking. It permits you to make another class that reuses the properties and strategies from a current class. A class that acquires from another class is called subclass (likewise a kid class or an inferred class). The class from which the subclass acquires is known as parent class (likewise a superclass or a based class). Other than acquiring properties and techniques from the parent class, a subclass class can have extra properties and strategies.

Legacy is exceptionally helpful on the off chance that you need to make a few comparative classes. You put the normal properties and strategies in the parent class and explicit properties and techniques in the youngster classes. This encourages you maintain a strategic distance from copy code that actualizes similar properties and strategy in numerous classes.

PHP legacy model

In the PHP articles and classes instructional exercise, we made a ledger ( BankAccount) class. We can expand the financial balance class by making other ledger classes e.g., sparing record class and financial records class that reuse the properties and strategies for the BankAccount class:

Sparing record : is an ordinary financial balance and acquires month to month intrigue.

Financial records: is an ordinary ledger, acquires no intrigue and has expense deducted month to month.

For more info connect us at Javatpoint

User Avatar

Safren Brown

Lvl 4
4y ago

What else can I help you with?

Related Questions

What type of inheritance is supported by php?

PHP Supports Multi Level Inheritance


What are the different types of inheritence?

there are several type of inheritance are exist like 1. single inheritance 2. double inheritance 3. multiple 4. multilevel 5. heirarchical inheritance


Does hybrid inheritance consist of ANY two types of inheritance?

There are only two types of inheritance to begin with: single inheritance and multiple inheritance. Since they are mutually exclusive there is no such thing as hybrid inheritance.


Different types of inheritances?

Single Inheritance Multiple Inheritance Multilevel Inheritance


Is tuxradar.com a good place to learn php?

Yes, though many other resources exist. The online PHP manual is an excellent example.


Can you have inheritance without polymorphism?

Yes. Inheritance and polymorphism are two different things. Inheritance is when the attributes and methods of a class are inherited by a deriving class that creates a more specialized type. Polymorphism is when two methods exist with the same name, differing only in argument types, or in class type. The former type, argument types, is an example of ad-hoc polymorphism that does not even require a class.


Types of heredity?

Mendelian inheritance, incomplete dominance, codominance, multiple alleles, polygenic inheritance, and sex-linked inheritance.


What is an inheritance Explain different types of inheritance in c?

C is not an object oriented language and therefore has no native support for inheritance.


Do you have to accept an inheritance?

You do not have to accept an inheritance. You can certainly waive your rights to any property bequethed to you. That portion of the estate will then be distributed according to the will as if you did not exist.


What type of inheritance pattern are these rabbits likely displaying?

Types of dominance, multiple alleles, sex linked inheritance, polygenic inheritance and maternal inheritance.


What is CMS and its Type in PHP?

CMS is a Content Management System, Some types of CMS's that are written in PHP would be WordPress, Drupal, Joomla. Is this what you were asking?


Is it possible to implement method overriding in each and every type of inheritance?

Yes. Method Overriding is not possible without inheritance and it can be done in all possible types of inheritance.