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.
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.
Due: Feb. 26
Monday:
Test 1
Tuesday (Lab)
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.
Muybridge Film Strip Maker
This lab uses the files in MuybridgeStripImages.zip. Make a page that has a
drop-down select with the numbers 0 through 11 as options in addition to a container (div) for the strip. Use the
select's onchange event to call a function that will generate the "film strip." Create a loop over the number selected
by the user. Before the loop, clear out any previously generated strip. In each iteration of the loop, create three
images and a break element. See last Friday's Heart3.html program for an example of creating an element.The images should
have sources of LeftSprocket, horse, and RightSprocket. The images should be given the same height.