Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Identifying OO elements in this scenario

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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

    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.

    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.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Identifying OO elements in this scenario

    Can you post the code you are having problems with?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Identifying OO elements in this scenario

    Quote Originally Posted by Norm View Post
    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

  4. #4
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Identifying OO elements in this scenario

    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.

  5. #5
    Junior Member
    Join Date
    Dec 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Identifying OO elements in this scenario

    Quote Originally Posted by helloworld922 View Post
    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

  6. #6
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default 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.

  7. #7
    Junior Member
    Join Date
    Dec 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Identifying OO elements in this scenario

    Quote Originally Posted by helloworld922 View Post
    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.

Similar Threads

  1. recursion for identifying amount of zeroes in minesweeper demo
    By Nightingale in forum Algorithms & Recursion
    Replies: 1
    Last Post: November 28th, 2011, 03:33 PM
  2. [SOLVED] ArrayList object's elements confusing??? doesnt replace the elements? set() method?
    By chronoz13 in forum What's Wrong With My Code?
    Replies: 10
    Last Post: June 21st, 2011, 01:20 PM
  3. Identifying invalid calls
    By joshft91 in forum Object Oriented Programming
    Replies: 1
    Last Post: February 26th, 2011, 05:38 PM
  4. Identifying calling object
    By frogfury in forum What's Wrong With My Code?
    Replies: 6
    Last Post: October 25th, 2010, 05:13 PM
  5. Replies: 5
    Last Post: January 30th, 2009, 09:31 PM