Java Question

O

Oliver Wong

Justin said:
Yes...I have argued that none of them can be declard a class
constant...

Didn't think that ppl will be messing around in this thread...

What i want to say is "this is an MCQ and what max score can it offer?
at most 1 point and there's no point for me, even if I need, to ask for
help here just for 1 point...I posted it coz i wanted to see how
different ppl will answer this Q...

Well, nobody knew it was worth only 1 point. (We still don't know, you
could be lying, for example). We also don't know 1 point out of what. If the
assignment totals 3 points, than 1 point is a significant fraction of that.
We also don't know if you're a borderline student, and only need 1 more
point to pass the course, in which case this 1 point would be extremely
valuable to you.

Being able to provide sufficient information and model the reasoning of
people who may not have as much information as you have about a situation
are important skills to develop. You'll need it if you want to develop good
compression algorithms or networking protocol (i.e. what information does
the server need to explicitly send the client, and what information can the
client derive), or even just for writing a design document or for adding
documentation to your source code.

- Oliver
 
D

Daniel Dyer

Yes...I have argued that none of them can be declard a class
constant...

Unless you are considering the possibility of unfortunate accidents, I
think it is safe to say that number of legs could be a class constant -
i.e., every tortoise has four legs. Age and weight differ between
separate tortoises and while average weight and longest recorded age apply
to tortoises at the class level, rather than to individual tortoises, they
will not be constant over time.

Dan.
 
O

Oliver Wong

Daniel Dyer said:
Unless you are considering the possibility of unfortunate accidents, I
think it is safe to say that number of legs could be a class constant -
i.e., every tortoise has four legs. Age and weight differ between
separate tortoises and while average weight and longest recorded age apply
to tortoises at the class level, rather than to individual tortoises, they
will not be constant over time.

The number of legs is one of the three way ties I was thinking of.
Average weight and longest recorded age are the others. Average weight might
not be the average weight of only the turtles in the simulator, but of all
turtles, past present and future. I.e. it might be derived from some model
that biologists have about turtles. E.g. the average weight of a hawksbill
hatchling is said to be 13.5 to 19.5 grams. It doesn't matter how many
turtles are in your simulator, nor what they weight; the average weight of a
hawksbill hatchling would remain constant regardless.

Similarly for longest recorded age. If it is known that turtles of a
given species have a life expectensie distributed normally around 200 years
with a standard deviation of about 30 years, but one freak turtle was
discovered to have lived two thousand years due to special circumstances
(perhaps surviving in a special environment which no longer exists), we
could probably safely rule out the possibility of ever seeing another turle
live as long (at least with the same, if not greater, plausibility that we'd
rule out the possibility of a turtle ever losing a leg), and just hardcode
that 2000 years is the longest recorded age, regardless of what age the
turtles in our simulator would ever reach. Perhaps the longest recorded age
field might even be used as a sanity check, so that if the ages of any
turtles in the simulator reaches that, we know some sort of error occurred
somewhere.

- Oliver
 
G

Guest

Justin said:
Which of the following would be the best choice to make a class
constant of the class Tortoise?

A. Weight
B. Number of Legs
C. Age
D. Average Age
E. Longest Recorded Age

Thank you.

I think the B & E can be as constant in future 100 years
 
I

IchBin

Justin said:
Which of the following would be the best choice to make a class
constant of the class Tortoise?

A. Weight
B. Number of Legs
C. Age
D. Average Age
E. Longest Recorded Age

Thank you.

OK, the only thing that, in all probability, will not change and be
considered a constant would be 'B'. All else can be average out..

--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,080
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top