Author | Message |
---|---|
jkang
Posts: 33
|
Posted 22:15 Feb 14, 2017 |
Do the input files that we downloaded contain a list of said object? (Cone.dat contains a list of cone objects) |
aalva190
Posts: 64
|
Posted 22:55 Feb 14, 2017 |
I want to say, even if they a list of cones object it doesnt really matter because what you wrote generic classes that works for any type of shapes. But to answer your question. If its a cone.data, its ideal that it contains cones only. Extra info. Try to get all data for cones and other data add it together and try to make a big list of shapes. Its something I would do tho, personally. |
jkang
Posts: 33
|
Posted 23:13 Feb 14, 2017 |
right, yes i would assume cone.data would contain data pertaining to cones only. It wasn't a question of whether cones.data has information about spheres and hamburgers, more so about inquiring as to what the contents of the cones.data is, whether it is full on objects or just data for the objects, but tanks |
aalva190
Posts: 64
|
Posted 00:43 Feb 15, 2017 |
My bad i misundertood. If i am right i think the data would cotain information about a list of objects. Then again, it could be information about the object. For example it might contain like radious of a cone and height. We have to use that given information to create an object and assort it to a list. If so, i would assume that all the the file is, is strings data. Using the reader we could read the information and create objects using our generic class. The file could possible contain," Cone 3,5". We would read cone. And if its a cone then we create a new object using our cone class. Then again, we could use our 2012 class to help us store a list of objects and read a list of objects.( i think thats why he mentioned serilazable)
I would personally assume that the data contains array list of objects already created. If not then it might contain a string of data, which we would read and we would have to use the information to create a list of objects. SHAPES. Maybe if you read it and print out.... what you read you can clearly see what is stored in the file. Remember this is in binary code. So reading it and printing it out in the console might help u see clearly.
Last edited by aalva190 at
00:47 Feb 15, 2017.
|
jkang
Posts: 33
|
Posted 06:02 Feb 15, 2017 |
Perfect, thanks! |