Describe the difference between concrete and abstract classes and give an example for each
What will be an ideal response?
An abstract class is one that cannot have instances, while a concrete class can. If a class has all the required attributes and operations that we expect from an object, then it is concrete. If it has only a subset, then it is abstract and we need a more specialized class. For example Art is an abstract class because we have found it to be too general to satisfactorily represent a specific work of art. Saying that somebody is interested in "art" does not explain enough. At best, it prompts a question: what kind of art? The answer might be music, literature, painting, theatre, etc. On the other hand, the Literature class has enough attributes to be "concrete". That is, we believe it can properly represent an actual literary work.
You might also like to view...
Why is an investor concerned with how the investment characteristics of a market-cap-weighted bond index can change over time?
What will be an ideal response?
A newly established company, The Malt Company, wishes to enter the beer market in Country A by building a new brewery there. Many companies already have breweries in Country A
These companies spend heavily on advertising, which Malt is finding difficult to afford. This is an example of ________. A) low costs of switching B) barriers to entry C) substitution D) high costs of switching