Inheritance diagram for GcdExercise:
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 |
© Bernhard Wagner, xmlizer.net, 2002.
Definition at line 12 of file GcdExercise.cpp.
GcdExercise::GcdExercise | ( | string | name | ) | [inline] |
Constructor.
name | The name of the exercise |
Definition at line 20 of file GcdExercise.cpp.
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.
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.
int GcdExercise::gcd | ( | int | a, | |
int | b | |||
) | [static, private] |
Calculates the gcd of two integers.
a | The first number | |
a | The second number |
Definition at line 73 of file GcdExercise.cpp.
Referenced by execute().
int GcdExercise::fA [private] |
int GcdExercise::fB [private] |