GcdExercise Class Reference

Inheritance diagram for GcdExercise:

AbstractExercise List of all members.

Public Member Functions

 GcdExercise (string name)

Protected Member Functions

void execute ()
void getInput ()

Static Private Member Functions

static int gcd (int a, int b)

Private Attributes

int fA
int fB

Detailed Description

The Exercise.

© Bernhard Wagner, xmlizer.net, 2002.

Definition at line 12 of file GcdExercise.cpp.


Constructor & Destructor Documentation

GcdExercise::GcdExercise ( string  name  )  [inline]

Constructor.

Parameters:
name The name of the exercise

Definition at line 20 of file GcdExercise.cpp.


Member Function Documentation

void GcdExercise::execute (  )  [protected, virtual]

Executes this exercise. To be overridden in subclasses. (Hook Method)

Reimplemented from AbstractExercise.

Definition at line 69 of file GcdExercise.cpp.

References fA, fB, and gcd().

void GcdExercise::getInput (  )  [protected, virtual]

Gets the input for this exercise. To be overridden in subclasses. (Hook Method)

Reimplemented from AbstractExercise.

Definition at line 62 of file GcdExercise.cpp.

References fA, and fB.

int GcdExercise::gcd ( int  a,
int  b 
) [static, private]

Calculates the gcd of two integers.

Parameters:
a The first number
a The second number
Returns:
The GCD

Definition at line 73 of file GcdExercise.cpp.

Referenced by execute().


Member Data Documentation

int GcdExercise::fA [private]

Definition at line 47 of file GcdExercise.cpp.

Referenced by execute(), and getInput().

int GcdExercise::fB [private]

Definition at line 48 of file GcdExercise.cpp.

Referenced by execute(), and getInput().


The documentation for this class was generated from the following file:
Generated on Thu Jul 3 19:12:45 2008 for Exercise Framework by  doxygen 1.5.1