This makes sense now, but I still have difficulty understanding the correct method of then getting the information from the array to print or whatever so each Identification item can display as a whole (i.e. with all variables from the class displayed for an instance of object 'Identification'.
The array understanding that does not follow is that of the indices for the objects shich is why I don't understand how you would correctly code a method to get an instance of the array...? BTW thank you for the reference to creation of an array of Objects. My study had not made rererence to this as an option, only that arrays had to hold instances of the same type. Craig On Fri, Jan 22, 2010 at 11:26 PM, Ali Shakiba <[email protected]>wrote: > Hi; > Sure; it is possible; > Just define your data type as this; code written in gmail editor > > class Identification { > public String > first, last, address, city, state; > public double singlePrice, total; > public int number; > } > > then in your main class; or code; > > Identification[] ids = new Identification[50]; > > With the hope of rising of Mahdi; > Ali Shakiba > Shahid Bahonar University of Kerman > Iran - Kerman > > > On Sat, Jan 23, 2010 at 7:34 AM, Craig Jensen <[email protected]>wrote: > >> Is it possible? >> >> Sample: >> >> My app prompts the user for input of first name, last name, address, city, >> state, etc plus two double elements. Each of these groups equal on element >> to display >> (i.e. >> { >> Joe Blow >> 123 S Main st. >> Somewhere, Tx 83999 >> number of widgets = 33 >> price per widget = 22 >> total spent on widgets = $726.00 >> } >> >> All elements are of typs String except the number of widgets (float) and >> total spent per widget (double). >> I collect this information for a set number of people, then terminate with >> a summary of total spent per person. >> >> >> Can this dataset be stored in an array to allow it to be retrieved as a >> single array element (the data {between the curly braces} above), for each >> person entered? >> >> Possible? >> >> -- >> To post to this group, send email to >> [email protected] >> To unsubscribe from this group, send email to >> [email protected]<javaprogrammingwithpassion%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/javaprogrammingwithpassion?hl=en >> > > -- > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected]<javaprogrammingwithpassion%[email protected]> > For more options, visit this group at > http://groups.google.com/group/javaprogrammingwithpassion?hl=en > -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en
