COMP 2404 Lecture Notes - Lecture 1: Ternary Operation, Arity, Computer Programming
Document Summary
An abstract class is a class that cannot be instantiated. They are too generic to create a concrete object. The derived class would all have same member functions but each would have different behaviours. You have an actual object whose job is to create other objects . It encapsulates creation of derived objects and returns it to the client class. Client class has a factory object and has some kind of a product. The client class takes a factory and asks it to create a product. Factory does not create an object of product because it is abstract, it creates an object of concrete product 1, 2 or 3 and return that to the client class as a product. The client class does not have to know which concrete product it is. Christine will give an actual example in a couple of weeks.