First, the project requirements
Basic requirements: Write 10-20 arithmetic topics to the document, the program reads and outputs the problem, and calculates the correct results. The user calculates the answer to each question, answers the correct questions, and answers the wrong output. Record the number of correct and incorrect answers and output them separately.
Arithmetic topic Basic requirements:
1. All four operations of subtraction appear
3. Parentheses appear in the calculation
2. Calculation of True and false fractions
4. At least one arithmetic with a length of 10 (10 numbers of mixed operations)Ii. Progress of the project
I used C + + to write, the primary use of the class is a custom stack class:
Template <classT>classarrstack{Private: intMsize;//the size of the sequential stack intTop//stack Top pointerT *st;//Examples of Stacks Public: Arrstack (intSize) {msize =size; Top= -1; St=NewT[msize]; } arrstack () {top =-1; } ~arrstack () {Delete[]st; } BOOLPushConstT item);//into the stack BOOLPop (T &item);//out of the stack BOOLGetTop (T &item);//get top of stack element BOOLIsEmpty ();//determine if the stack is empty BOOLIsfull ();//determine if the stack is full voidClear () {//Empty Stacktop =-1; } BOOLGettwooperands (t &fst, T &SCD);//get stack top two elements and out of stack};
Several functions to be implemented by the program:
File read
Expression conversions
Calculation results
User interaction
Graphical interface or automatic generation of formulas
The function that can be implemented now is to read the calculation from a text file
The program calculates the result
Features that have not yet been implemented will be perfected in the future.
Arithmetic Personal project Progress