dimanche 27 septembre 2020

a question when reading the classical book Design Patterns:Element of Reusable Object-Oriented Software

I'm learning the design pattern by reading the classical book of GOF -- Design Patterns:Element of Reusable Object-Oriented Software.In Chap2:a case study, we define a Glyph abstract class for all objects that can appear in a document structure.In Glyph,there is a method and its description

virtual void Bounds(Rect&): The Bounds operation returns the rectangular area that the glyph occupies. It returns the opposite corners of the smallest rectangle that contains the glyph. Glyph subclasses redefine this operation to return the rectangular area in which they draw.

Why the return type of Bounds operation is void according to its description?

Aucun commentaire:

Enregistrer un commentaire