Starting to create a MathBuilder framework, help to start creating the design
Posted
by
Darf Zon
on Programmers
See other posts from Programmers
or by Darf Zon
Published on 2012-06-29T05:46:58Z
Indexed on
2012/06/29
9:23 UTC
Read the original article
Hit count: 458
Let explain what I'm trying to create. I'm creating a framework, the idea is to provide base classes to generate a math problem.
Why do I need this framework? Because at first time, I realized when I create a new math problem I always do the same steps.
- Configuration settings such range numbers. For example if I'm developing multiplications, in beginner level only generate the first number between 2-5 or in advanced level, the first number will be between 6- 9, for example.
- Generate problem method. All the time I need to invoke a method like this to generate the problem. This one receives the configuration settings and generate the number according to them. And generate the object with the respective data.
- Validate the problem. Sometimes the problem generated is not valid. For example, supposed I'm creating fractions in most simplified, if I receive 2/4, the program should detect that this is not valid and must generate another like this one, 1/4.
- Load the view. All of them, have a custom view (please watch below the images).
- All of the problems must know how to CHECK if the user result is correct.
- All of this problems has answers. Some of them just require one answer, anothers may require more than one, so I guess a way to maintain flexibility to the developer has all the answers he wanna used.
- At the beginning I started using PRISM. Generate modules for each math problem was the idea and load it in the main system.
I guess are the most important things of this idea.
Let me showing some problems which I create in a WPF standalone program. Here I have a math problem about areas. When I generate the problem a set to the view the object and it draw it.
In beginner level, I set in the configuration settings that just load square types. But in advance level, can load triangles and squares randomly.
In this another, generate a binary problem like addition, subtraction, multiplication or division.
Above just generate a single problem. The idea of this is to show a test o quiz, I mean get a worksheet (this I call as a collection of problems) where the user can answer it.
I hope gets the idea with my ugly drawing.
How to load this math problems? As I said above, I started using PRISM, and each module contains a math problem kind. This is a snapshot of my first demo.
Below show the modules loaded, and center the respective configurations or levels.
Until momment, I have no idea to start creating this software. I just know that I need a question | problem class, response class, user class.
But I get lost about what properties should have to contain in it.
Please give a little hand of this framework. I put much effort on this question, so if any isn't clear, let me know to clarify it.
© Programmers or respective owner