A class can be abstract.
You can create an object of a concrete class.
You cannot create an object of an abstract class.
In this lesson, you will label your parent class abstract.
Now, the main problem is you shouldn't be allowed to create an object of the product class.
Right now, product is a concrete class, which means we can create an object of the product class.
I could write something like product product.
Is equal to a new object of the product class.
That is, let's say, for 99 blue.
And I don't know, just put Java for the brand.
Now, here's the issue.
The requirements state that your clothing store sells shirt and pants.
So what's product what are we selling here?
Is it a shirt or is it pants?
We don't know.
That's why we need to forbid the color from creating an object of the product class.
How do we do that?
You make the class abstract, you cannot create an object of an abstract class, make a class abstract
if its only purpose is inheritance.
So we're going to make the product class abstract.
And that's it.
And now the color isn't allowed to create an object of it anymore.
The only purpose of the product class is to provide inheritance for pants and shirt.
You cannot create an object of an abstract class.
Make a class abstract if its only purpose is providing inheritance.