📄 mathquestface.h
字号:
#ifndef _MATHQUESTFACE_H
#define _MATHQUESTFACE_H
// quiz questions involving arithmetic (addition)
// see comments in questface.h for the naming conventions
// used in quiz classes
//
// MathQuestion() -- no carry involved, two-digit numbers
// CarryMathQuestion() -- does have carry, two-digit numbers
// HardMathQuestion() -- three digit addition
//
// these classes add method Description() to the question hierarchy
#include "questface.h"
class MathQuestion : public Question
{
public:
MathQuestion();
virtual bool IsCorrect(const string& answer) const;
virtual string Answer() const;
virtual void Ask() const;
virtual string Description() const;
virtual void Create(); // create a new question
protected:
string myAnswer; // store the answer as a string here
int myNum1; // numbers used in question
int myNum2;
};
class CarryMathQuestion : public MathQuestion
{
public:
CarryMathQuestion();
virtual string Description() const;
virtual void Create();
};
class HardMathQuestion : public MathQuestion
{
public:
HardMathQuestion();
virtual string Description() const;
virtual void Create();
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -