Design Pattern Examples
Overview of object-oriented design patterns
EntryInformation Class Reference

Represents an individual with a Name, Age, and Height. More...

Collaboration diagram for EntryInformation:
Collaboration graph

Public Member Functions

 EntryInformation (string name, int age, int height)
 Constructor.
 
override string ToString ()
 Convert the entry into a string. In this case, a formatted string where name, age, and height are confined to columns.
 

Public Attributes

string Name
 Name of this individual.
 
int Age
 Age of this individual, in years.
 
int Height
 Height of this individual, in inches.
 

Detailed Description

Represents an individual with a Name, Age, and Height.

Definition at line 15 of file Strategy_ShowEntries_Class.cs.

Constructor & Destructor Documentation

◆ EntryInformation()

EntryInformation ( string  name,
int  age,
int  height 
)
inline

Constructor.

Parameters
nameName of the individual.
ageAge of the individual (in years).
heightHeight of the individual (in inches).

Definition at line 38 of file Strategy_ShowEntries_Class.cs.

References EntryInformation.Age, EntryInformation.Height, and EntryInformation.Name.

Member Function Documentation

◆ ToString()

override string ToString ( )
inline

Convert the entry into a string. In this case, a formatted string where name, age, and height are confined to columns.

Returns

Definition at line 51 of file Strategy_ShowEntries_Class.cs.

References EntryInformation.Age, EntryInformation.Height, and EntryInformation.Name.

Member Data Documentation

◆ Age

int Age

Age of this individual, in years.

Definition at line 25 of file Strategy_ShowEntries_Class.cs.

Referenced by EntryInformation.EntryInformation(), Strategy_SortEntries_ByAge.Sort(), and EntryInformation.ToString().

◆ Height

int Height

Height of this individual, in inches.

Definition at line 30 of file Strategy_ShowEntries_Class.cs.

Referenced by EntryInformation.EntryInformation(), Strategy_SortEntries_ByHeight.Sort(), and EntryInformation.ToString().

◆ Name


The documentation for this class was generated from the following file: