|
-
December 18th, 2011, 07:02 PM
#1
need some help in creating classes
I'm new to OOP
what I'm trying to do is use the naive bayesian alogrithm on the iris database
each flower has 5 attributes:
sepal length, width, petal length & width and the flowertype
here's my class code so far:
public class flower
{
double slength;
double swidth;
double plength;
double pwidth;
string ftype;
}
i understand that if i declare a flower of a certain type i can access its attribute using x.slength=1.2;
what im trying to do is create an Array of flowers so i did the following:
flower[] list = new flower[90];
how can i access the 31st flowers petal length???
thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|