Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

GcdExercise Class Reference

Inheritance diagram for GcdExercise:

AbstractExercise List of all members.

Public Methods

 GcdExercise (string name)

Protected Methods

void execute ()
void getInput ()

Static Private Methods

int gcd (int a, int b)

Private Attributes

int fA
int fB

Detailed Description

The Exercise.

© Bernhard Wagner, xmlizer.biz, 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().

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().

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.


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 Sat Jul 19 18:19:54 2003 for Exercise Framework by doxygen1.2.18