One of the many tedious aspects of the tutoring business is to schedule the groups of students.
Last week I developed a subscription system that collects several data points on the user and then groups them by ensuring compatibility with other users. If a user is not compatible with any of the current groups the system will create a new one.
I tried to make this app as modular as possible. Each data point collected is actually a model and is unrelated to the other models. Each model has a method called compatible?( model ). The parameter it takes is another model of its own class. It then compares the models and returns true if they are compatible. Comparing two users compares all their sub models for compatibility. Comparing a user to a group compares that user to all the users in the group.
If we want to add more data then we just need to add another model, write its compatibility method, and make the user compatibility check use it.
No comments:
Post a Comment