an old post just want u people to have fresh look On Sat, Jul 21, 2012 at 6:13 PM, vicky b <[email protected]> wrote:
> Requirement: > > This is basically an agricultural project (web application).I need to > design module where some calcuation takes place. > There are differnt crops invovled like maize,tomato,okra etc.Now each of > these crops have different traits. > Each trait has a mesurament scale which lies in integer like 200-1000.now > let say i have planted the crop and > done measurement noted down the traits.Now i want to do some sort of > measurement.Some measurements are simple and some are > complex. > > Lets take an example of crop maize.I have recored observations for 15 > trait.(trait1.. trait15 are just alias the acutal name can be like > plt_ht,yld) > trait1 trait2 trait3 trait4 trait5 trait6..... trait15 > > i have recorded 5 observations for each traits > trait1 trait2 trait3 trait5 trait6..... trait15 > 01,02,03,04 01,02,03,04 01,02,03,04 > > User logs into system and selects his crops and enters data for these > observation i either have to calculate average of those data entered for > each or sum of those. > This is simple but complexity comes when for some of the tratis i have > some different formulas. Like lets take an example let say a trait YLD has > a formula based on which i have to caluate its value which may also depends > on some other traits .This way all differnet crops have different > traits.All this i am able to do whenever user selects crop i will check for > those specific traits and do calculations if it is not special trait then i > eaither avg it or sum it based on db entery but there is lot of hard coding > .I want to have some suggestion from you people if u can think of an better > way of handling this. > > My code has to behave like excel but it is not excel .I have to write java > programme which reads data enetred in excel sheet and does calcuation like > excel.Each trait is mapped to columns in the sheet. And each crop can be > defined as worksheets. The formulas are equivalent to the excel formulas. > > Since user will enter data in excel adn uploads to my application can > also using some features provided by excel .Of course am usign apache poi > to generate excel for user to enter data > -- *Thanks & Regards Vickyb *
