How to get length of the string with out using string length method,
Thanks in advance
Welcome to the JavaRanch.
We're a friendly group, but we do require members to have valid display names.
Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.
Please edit your profile and correct your display name since accounts with display names get deleted, often without warning
Originally posted by Stan James:
Print it, cut it out, weigh it.
Thats how my chemistry professors used to calculate the area under a curve back when they were undergrads. Gotta love the old - skool.
[ July 28, 2006: Message edited by: Garrett Rowe ]
Originally posted by Stan James:
My dad gave me that, and I got credit in HS science calculating the area of an irregular shape. It's right up there with ways to determine the height of a building using a barometer.
From this parible/ article:
Yeah, that barometer is really irreplaceable in this case. That role couldn't possibly be filled by al large rock. Or a small rock. Or... hell, no rock or anything else at all. I think ropes have enough weight of their own to hand in a generally downward direction.
[GR]: ...take the barometer and begin to walk up the stairs. As you climb the stairs, you mark off the length of the barometer along the wall. You then count the number of marks, and this will give you the height of the building in barometer units. A very direct method.
Yep. I assume you meant the veritical length, as the length along the general direction of the staircase is irrelevant. You can also do this more directlly by having someone scale the building, if the edifice is suitably craggy for footholds. If you're not moving straight up (or down) - are you drawing a really precise horizontal line every time you need to delimit two different barometer height measurements? Probably not. Seems like this will be a rather large source of errors for this method.
[GR]: ...tie the barometer to the end of a string, swing it as a pendulum, and determine the value of 'g' at the street level and at the top of the building. From the difference of the two values of `g' the height of the building can be calculated.
the funny thing about this answer is that it overlooks that it's achieved a better answer about halfway through, before anyone has to travel up (or down) the length of the building. (Easy in an elevator, but pretty tiring if you have to use the staircase.) I'm thinking that the variation in g is a very poor way to determine building height, considering that local variations in density (e.g.. mountains) are likely to be much more significant than differences in distance from the center of the earth is. Feh. Maybe this is different for those of you in flat areas of the Earth, but for me: forget about the difference between 'g' values at the bottom and top of the building - just use a standard value for g-at-anywhere-roughly-on-the-surface-of-the-earth, plus the period of the pendulum (at top or bottom; doesn't really matter), and plug into the pendulum equation to determine the length of the pendulum. Assuming the earlier just-measure-the-length-of-the-damn-rope technique has failed for some reason - don't want to overlook the even-more-obvious solution.
[GR]: take the barometer to the basement and knock on the superintendent's door. When the superintendent answers, you speak to him as follows: "Mr. Superintendent, here I have a fine barometer. If you tell me the height of this building, I will give you this barometer."
While this is my favorite answer to this particular chestnut, I have to think that there's a significant possibility the super has no idea what the height of the building is, but is perfectly willing to lie on the spot in order to obtain that fine barometer. (Tremendously valuable, no doubt.) Trust no one.