Using a Child Class as its Parent Class

Using a Child Class as its Parent Class

Why would you want to use a child class as a parent class?

" An important facet of polymorphism is the ability to use a child class object where an object of its parent class is expected.

One way to do this explicitly is to instantiate a child class object as a member of the parent class. We can instantiate a CheckingAccount object as a BankAccount like this:

BankAccount kaylasAccount = new CheckingAccount(600.00);

"
Why would you want to create a new CheckingAccount as a BankAccount type versus a CheckingAccount type? Are there any benefits to this and could you please provide examples of when you would use both scenarios. Thank you.