Anda di halaman 1dari 2

W.T.

Lab Cycle II Problems


Javascript (Note : Use associative array wherever needed)

1.Design a HiTech Calculator. 2.Write a scrript that reads in the size of the side of a square and outputs HTML text that displays a hollow square of that size out of asterisks. Use a prompt dialog to read the size from the user. Your program should work for squares of all side sizes between 1 and 20. 3.Design a webpage that appears differently, depending on the time of day. For instance, the page might display a rising sun for a background if viewed during the morning, a starry sky If viewed during the evening, and so forth. If youre feeling particularly adventurous, prompt visitors to the webpage to specify the time of day before displaying the page, rather than relying on the system clock. 4.Design a webpage that plays a number-guessing game with the visitor. Specifically, the Page should ask the visitor to guess what number the page is thinking of. The page should provide feedback to the visitornamely, hints that help the visitor guess the right number. The number that the page is thinking of should be chosen randomly, lest your game be fun only once. :-) Feel free to limit the number of guesses the visit has. Also feel free to prompt the visitor for a range of numbers from which the number will be chosen randomly. 5.The game uses a grid of images that all begin by showing question marks. The table must have an even number of squares and must have at least six squares in it. For example: ? ? ? ? ? ? ? ? ? ? ? ?

When the user clicks on one of the squares marked with a ? the question mark is replaced with a word or image. Clicking on another square will reveal another word or image. If the images match they remain visible for the duration of the game. If they do not match no further hidden squares can be seen unless at least one of the revealed images is turned over again by clicking on it. In other words only two non matching images can be seen at one time. In the following illustration ? ? the ?

then their ?

The

clicking on additional ? squares has no effect because two non matching squares (then and their) are showing. Clicking on either square with the word "the" in it has no effect because these squares are matched. Clicking on the "then" or the "their" square will "turn them over" so that only a ? is displayed. When all the squares are matched the game is over and the number of clicks on ? squares to reach the end is reported. 6.Design a system having maximum number of Navigator objects with few properties/methods/events used for them.

Anda mungkin juga menyukai