Provide a brief definition of the following terms (in the interface
programming context):
Loop
Iteration
Infinite loop
Off-by-one error
Increment/Decrement
If you use a source (book or web site), cite your source. (The sites
http://whatis.techtarget.com/ and http://www.webopedia.com/ are decent
sources for technical definitions. )
Inchworm
The code loads up an empty drop-down select with the numbers 2 through 10. Next, when a user uses a drop-down select
to choose a number between 2 and 10, an inchworm is created from the head and segment images
InchwormHead.gif and
InchwormSegment.gif.
The height of the image varies such that each consecutive image is 90% of the previous one.
Straight Line Depreciation
Write a program that produces a straight-line depreciation schedule. The user
would enter the initial value of the item, the "salvage value" -- the presumed
value of the item after it has been used a number of years, and the lifetime -- the
expected number of years the item will be used. The program then takes the difference (subtraction)
between the initial and salvage values and divides that by the lifetime to produce the
amount the item is depreciated each year. Then use a loop to produce the
depreciation schedule: a list of years and the value of the item in that year.
See below.
Muybridge Film Strip.
Write a page that allows the user to choose a number between
1 and 11 that corresponds to the number of frames in a "film strip". When
the button is clicked, use a for loop to construct the film strip. I used
a dynamic table (that was not there at the start), each row had three cells. The
first cell holds an sprocket image (SprocketLeft.gif); the second cell holds a
horse image which changes with each row (horse1.jpg, horse2.jpg, etc.); the third
cell holds the other sprocket image (SprocketRight.gif). I made the table's
background-color to black, and I had to set the height attribute of the images. If
the user changes the number in the drop-down select the "film strip" should be
removed from the display.
(Uses MuybridgeStripImages.zip)
Adding options to a select with code:
DropDownPopulator_2.htm
Can be used for drop-down selects above. Has to be used for this week's homework.
Someone requested the Subway practice test solution
Subway/Subway.htm