CSE 12: Survey of Computer Science
Assignment #8 (HTML, Flash, Social, AI)

Laboratory work for 11/17:
Start the multimedia with Start>Run uc, which launches the multimedia for The Univesal Computer. This week you will study the last two sections of the User interface and web design, the Flash tutorial and Dreamweaver tutorial. Then you will start working on exercises creating web pages (in Dreamweaver) and Flash movies, which will be part of your last homework assignment. I do recommend that start these exercises in lab, when the TAs and I will be available to help you. You can continue working on these homework exercises in lab after completing the multimedia for each of the next two weeks. I recommend that you show your work on web page and Flash movies for the homework exercises below to the TA in lab, to save you the trouble of submitting it. Otherwise, upload your html, fla and swf files with the rest of your homework assignment, here.

Laboratory work for 11/24:
Multimedia for Social and ethical issues.

Laboratory work for 12/1:
Multimedia for Artificial intelligence, then complete a web-based survey; the password is lehigh! (Note: this password doesn't seem to work within Blackboard, so shut down the browser and start it up again, then go to address bar and enter www.cse.lehigh.edu/~glennb/cse12/ex8-12.htm to see this page outside of Blackboard, then click on the above link and the password will work.)
When you get to the Thanks screen, make sure the TA sees that have completed the survey. This survey is anonymous, but your feedback is important. If you aren't able to complete this survey in lab, email me as soon as you have completed them, before the final exam.

Homework exercises:
Do the following exercises in The Universal Computer:

Exercise 8.13: What are the first three words after the <title> tag and where do these words appear in the browser?
Exercise 8.14: What does each of the parameters of the <body> tag do? (If you can’t figure them out, check out documentation at hhttp://devedge.netscape.com/library/manuals/1998/htmlguide/.)
Exercise 8.15: Looking back at this page in the browser, what happens when you roll the mouse over the picture of the book cover? What happens when you click on the book cover? Viewing the source code again, how did the page get these effects?
Exercise 8.16: Reload or refresh the page in your browser and notice what Knobby does on the right side of the page. What does Knobby do? What did the web page load in to give this effect? The effect is not something the browser does, it just plays the embedded file. (To learn how the file does it, look at http://www.cse.lehigh.edu/~glennb/mm/gifcon/index.htm.) Explain briefly how it works.
Exercise 8.17: There is a button at the bottom of this page that says “Contact Us”. What does it do and how does it work?
Exercise 8.18: Navigate to http://www.cse.lehigh.edu/~glennb/um/weblinks.htm. What happens when you click on different parts of the graphic on top? Explain how it works, in terms of the HTML code.
Exercise 8.19: Design your own web page. Give it a title, use different text formatting, heading levels, paragraphs and breaks. Include a couple of hyperlinks and a graphic as a link to another page. Use alt tags in your images. Test your work either by having a browser open your HTML file locally, or by uploading your file to a web server and giving a browser the URL for your page. Make sure it is clear and usable. Notes: learn how to set up your own public web page on Lehigh's web server. You can use Dreamweaver or Netscape Composer to create your web page, but you should also understand the HTML code that the WYSIWYG creates.Exercise 8.22 (explore): Do some research on the web to study the differences between GIF and JPG formats and when to use which. Support your conclusions about the tradeoffs with a web page including links to sample images, highlighting the strengths of each format.
Exercise 8.22 (explore): Do some research on the web to study the differences between GIF and JPG formats and when to use which. Support your conclusions about the tradeoffs with a web page including links to sample images, highlighting the strengths of each format.
Exercise 8.28: You can find the document shown in figure 8.6 on the web at http://www.cse.lehigh.edu/~glennb/um/book/bgcolors.htm. Load it into a web browser, and experiment with it. What are the first three colors and their hex values? Explain how they are produced. Then press the browser’s Refresh or Reload button and repeat the same experiment. Do you get the same three colors? Is this what you expected? Why or why not?
Exercise 8.36: Explain how function bulbOff()gets invoked and changes the bulb image.
Exercise 8.38: Taking into account the user interface design principles introduced earlier in this chapter, when is a rollover effect a good idea and when might it not be such a good idea?
Exercise 8.39: Why is Flash’s default rate of 12 frames/second usually acceptable and also practical for its computer-generated animations?
Exercise 8.43: What is a motion guide for? Explain how to use it to get an animation effect you couldn’t get without it.
Exercise 8.46: If you have access to Flash, experiment with motion tweens (changing the location, size, color and orientation of different images) and shape tweens (morphing between images and changing the alpha transparency of an image). Put each effect on a different layer (you create a new layer on the timeline by clicking on the + icon at the bottom of the timeline area).
Exercise 8.50: After experimenting with the ActionScript described above, try writing a script that will play a movie three times.
Exercise 8.51: The default behavior of the above ActionScript is to open the specified URL in a new browser window. To open the URL in the same browser window, you need to add a parameter to the action. Use Flash’s context-sensitive help facility (a little reference book icon with a question mark on it near the upper right corner of the Actions window) to learn more about getURL and its parameters. Then write the ActionScript that opens a URL in the same window.

Create a Flash movie with at least two different kinds of animation (e.g., motion, shape, alpha, motion guide tweens) and buttons that starts and stop each animation. (Be creative with respect to what the animations look like and how the buttons work.)

Social and ethical issues:
Exercise 9.4: Prof. Barnes argued in 1984 that despite all the hype there hadn’t really been a computer revolution yet. Do you agree? Or would you think the sweeping social change of a revolution is more apparent now? If so, how? Either provide at least three reasons one way or the other, or argue both ways.
Exercise 9.14: Leaving aside credit card information or other very personal information, do you think it’s okay for your employer to read all your ordinary e-mail messages? Why or why not?
Exercise 9.20: Does relativism seem attractive to you as an ethical theory? Why or why not?
Discuss one of exercises 9.24 or 9.25 or 9.26, using the criteria given above these exercises.
Exercise 9.27 (explore): In the 90's, Congress passed legislation keeping Internet commerce tax-free. But many states are looking forward to the sunset of these provisions so that they can get income from e-commerce. Should e-commerce remain tax-free? Do e-commerce firms and their typical clientele have an unfair advantage over brick-and-mortar counterparts? What are some of the difficulties of taxing e-commerce and how might they be overcome?

Artificial Intelligence:
Exercise 10.5 (ELIZA).
Exercise 10.12: The algorithm of figure 10.5 is called a best-first search, because it maintains heuristic values for all leaf nodes, picking the best of the lot. Another heuristic algorithm, known as hill-climbing, avoids the overhead of maintaining a tree of leaf nodes, instead just picking the best of the nodes that the current best state can generate. Which is more like depth-first search—best-first or hill-climbing? Which is more like breadth-first search? For the example of figure 10.4, what happens to a hill-climbing algorithm that uses heuristic h1?
Exercise 10.20 (explore): Use the web and/or your library to learn more about an expert system being used to solve a practical problem. Discuss how it works and its benefits.
Exercise 10.25: Why are everyday tasks, such as recognizing words or faces, though seemingly easy for humans, often surprisingly difficult for AI? (The following question can be a starting point for discussion.)
Exercise 10.26: Why would a speech recognition program have difficulty telling the difference between the sentences “He stops at the store” and “His top’s at this door”? How do you think humans manage to tell the difference?
Exercise 10.32: If you had an EMYCIN-based (backward chaining) shell, a forward chaining shell, a frame-based shell, a case-based reasoner, and a back propagation neural network tool, which would you choose for simulating the following experts, and why?
a) An operator monitoring sensors on a nuclear reactor.
b) A hand writing expert.
c) A civil engineer designing bridges.
d) A mechanic troubleshooting Toyotas.
e) A help desk helping with problems with a company's line of printers.

Extra credit:

Exercise 8.20: Add an image map to your page. (Make sure the TA knows you added this feature!)
Exercise 8.21: Use tables and/or frames to organize the layout of your page. (Make sure the TA knows you added this feature!)
Exercise 8.23 (explore): Do some research on the web to discover some of the differences between the two (or more) web browsers, and how web designers try to accommodate some of these differences.
Exercise 8.31 (explore): We explained two JavaScript event handlers above. There are many more. Use a web search engine to find the other event handlers. Describe what at least three other event handlers do, with what HTML elements they are associated, and discuss how you might use them.
Exercise 8.54: After going through the multimedia tutorial, create a Flash movie with its own interactive drag and drop interaction. A couple of design questions: 1) Why is it important to provide clear instructions explaining what the user should do to successfully perform this exercise, without giving away the solution? 2) Why is it important that the draggable object return to its original position if the user drags it to the wrong place? And technical questions: 1) Why do we need to use movie clips to create this exercise? Why do we need to give the movie clips instance names?

Exercise 9.29 (explore): Speaking of Microsoft, the federal government recently settled an anti-trust suit, but a couple of states and Europe are still holding out. Is Microsoft violating anti-trust law? What are some of the arguments on each side of the case? What should be done about it?
Exercise 10.7: Consider the following sentences:
The boat floated on the lake sank.
The boat left on the lake sank.
Is one of these harder for you (or if not you, a friend who hasn’t seen these sentences) to process than the other? Why? Explain how the boundary backtracking algorithm would process each of these sentences, i.e., when it saves and later attempts to backtrack to states in registers.
Exercise 10.34 (explore): How are agents and softbots being used to facilitate shopping and other activities on the web? Do some research on the web and/or in the library.

Due: Friday, 12/5, anytime before midnight.

Hand in: Submit your homework here, in Blackboard.

Prof. Blank