Identifying OO elements in this scenario
This is basically a agricultural web application where users(Scientist) do some sort of experiments on seeds of crop to develop better hybrids.There is one particular module where the users actually have to do some sort mathemical analysis on growth of these seeds so in this Module they records some observation and push it to system .System then calculates based on the data.So here is explanation of the Module:
There are crops and each crop have traits , traits are actually a measurement scale to decide growth of a seed of a particular crop. This module is to for planters to observe growth of seeds sowed of certain crops and take down n no of observation for each trait and upload in csv format.Once they enter data i have to either avg out the values or sum the values or sometimes there are more complex function that i have to apply it may differ for each trait This is the whole module about.Just to give an idea about how they will enter data
Code :
Hyubrid(seed) trait1 trait2 trait3 trait5 trait6..... trait15
Hybrid1 01 02 03 04 01
HYbrid2 04 06 08 04 01
HYbrid2 04 06 08 04 01
HYbrid2 04 06 08 04 01
HYbrid2 04 06 08 04 01
Once they enter data in this format i have to give result something like this.
Here avg colum does not necessaryly mean avg it can be sum or any formula based resutl.Hybrid is the seed for which they record the observation. I have shown avg column only for two tratis it is actually for all the traits.
Code :
Hyubrid(seed) trait1 Avg trait2 avg trait3 trait5 trait6..... trait15
Hybrid1 01 01 02 04 03 04 01
HYbrid2 04 04 06 10 08 04 01
HYbrid2 04 04 06 12 08 04 01
HYbrid2 04 04 06 14 08 04 01
HYbrid2 04 04 06 12 08 04 01
Hope this clarifies atleat a but
The data are not correctly indented but there is no way i can format it.
Re: Identifying OO elements in this scenario
Can you post the code you are having problems with?
Re: Identifying OO elements in this scenario
Quote:
Originally Posted by
Norm
Can you post the code you are having problems with?
I dont have a code which is of oops it is more of procedure oritented progamming i want to re-desgin it with object oriented point of view hence i am asking this questoin
Re: Identifying OO elements in this scenario
Quote:
There are crops and each crop have traits , traits are actually a measurement scale to decide growth of a seed of a particular crop
Sounds like this is a good candidate for some OO design. First identify what "objects" are there. Then decide what attributes/properties each object should have, and how each object can be manipulated.
Re: Identifying OO elements in this scenario
Quote:
Originally Posted by
helloworld922
Sounds like this is a good candidate for some OO design. First identify what "objects" are there. Then decide what attributes/properties each object should have, and how each object can be manipulated.
I want help to identify those things i.e why i have posted it here :)
Re: Identifying OO elements in this scenario
Well, what sounds like it could be an object? A seed might be a good choice. A seed has traits (potentially another good object). A seed also belongs to a certain crop, though this starts to get tricky if a seed may be a hybrid of multiple crops.
Re: Identifying OO elements in this scenario
Quote:
Originally Posted by
helloworld922
Well, what sounds like it could be an object? A seed might be a good choice. A seed has traits (potentially another good object). A seed also belongs to a certain crop, though this starts to get tricky if a seed may be a hybrid of multiple crops.
Hybrid will belong to only a particular crop.Any more suggestions on this.