Laboratory work for Tuesday 11/18 and Thursday 11/20:
This week you will study two multimedia units:
1) Start>Run umcpp, then select Classes: An Inside Look. Answer
the following questions:
a) What does the scope operator do?
b) Show your code for the revised version of Planet.h and Planet.cc, with a
new data member num_moons plus insertor and extractor functions.
Note: Lookout's project facility is not working, so I provide a version of
planets.cc that you can File>Save As on your local machine and compile as one file
(i.e., planets.cc merges planet.h, planet.cc and planetst.cc as one file).
c) What do we mean when we say that public derivation implies subtype inheritance?
Give an example.
d) After studying atmOop.cc, from what class would you derive a new MoneyMarket
class? Why? Note: you need to copy atm_oop.cc and atm_oop.h
to the same folder
to compile this program, or just atmOop.cc, which combines them.
e) Why is a good idea to use inserter (set) and extractor (get) functions to
access data members?
2) Start>Run uc, then select User interface and web
design, then study the first two sections, Usability
and HTML. Answer the following questions:
a) What are the goals of HCI?
b) Discuss an example of a user interface that violates one of the criteria
for usability given in the multimedia.
c) Show an example of HTML code that modifies the title bar of a browser.
d) Show an example of HTML code attaching a link to a graphical image.
e) What is a plug-in? What does Microsoft Internet Explorer use to give the
effect of a plug-in?
Do exercise 8.19, given below (you may use Dreamweaver, in which case you may want
to go through the optional Dreamweaver tutorial in this chapter first).
Show your web page to the TA.Go through the Dreamweaver tutorial and
On Thursday, 11/20 also select User interface and web design,
then study the Flash tutorial (the Dreamweaver tutorial
is optional). Then you will start working on the following exercises (once you
have shown work for these exercises to a TA, you do not need to hand
them in as homework).
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.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).
Show your web page and Flash movie for these questions to the TA before you
leave; then hand them in as part of your final homework assignment.
Laboratory work for Tuesday, 11/25:
This week you will study the two multimedia units:
1) The Flash tutorial, as described for 11/20, above.
2) Start>Run uc, then select Social and ethical issues. Answer
the following questions:
a) Do you think the Computer Revolution is comparable to the Industrial Revolution?
Why or why not?
b) What are a couple of technical ways to ensure communications privacy?
c) When might it make more sense for a software developer to rely on copyright
to protect his work? What cannot be copyrighted?
d) What are the "primitives" of ethical reasoning? Where can you find
them?
e) What problem solving methods can you use to solve more complicated ethical
problems?
Show your answers for these questions to the TA before you leave; then hand
them in as part of your final homework assignment.
Laboratory work for Tuesday, 12/2:
This week you will study the multimedia for Artificial intelligence,
then complete two web-based surveys.
Click here to 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/cse15/ex8-15.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.
Then take another short survey to give Prof Kessler
and Scott Frees about their collaborative tools. These surveys are 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.
Laboratory work for Thursday, 12/4:
This week you will study the multimedia Social and ethical issues
and answer the questions above (under Tuesday, 11/25), then study the multimedia
for Artificial intelligence, and fill out the surveys described above (show the TA).
Homework exercises:
Implement the Game of Life, following your analysis and UML design (with at least two classes). Make sure all functions work properly and make sure your program accomplishes all your use cases. Continue to work with your partner, using pair programming as much as possible. Put both names on your program; if one person is primarily responsible for a function, include that person's name in your comments above that function. Only one person need submit the program; the other person can just mention that their partner handed in the homework, and submit the rest of the assignment, below (i.e., don't work on the rest with your partners).
Do the following exercises in the book:
Classes: an inside look:
Exercise 16.1: A class can have more than one constructor. (In other words,
constructors, like operators and other member functions can be overloaded, so
long as different versions are distinguishable by their parameters.) Declare
a second constructor for BaseballPlayer which also initializes a player's name
to a specified value.
Exercise 16.3: Why didn't we need to use dot notation to call setPosition from
the constructor?
Exercise 16.5: As exercise 16.1 noted, a class can have more than one constructor.
Now implement and test a second constructor which also initializes a player's
name to a specified value.
Exercise 16.25: Compile and run atmOopt.cc, which inserts some output messages
so you can observe the behavior of constructors. Describe what happens when
the program starts up, before it even requests an ATM card, step by step, in
your own words, and why.
User interface and web design:
Exercise 8.4 (social/ethical): When people cannot figure out to use a mechanical
or computer system, why do they sometimes apologize, saying things like, “I’m
sorry, I’m no good with mechanical things” or “I’m no
good at computers”? Who’s to blame here? What are the business costs
as well as broader social costs of interfaces that discourage users? What if
anything can be done to alleviate these costs?
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/book/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.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.39: Why is Flash's default rate of 12 frames/second usually acceptable
and also practical for its computer-generated animations?
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 16.11: Design, implement and test a class Bicycle which stores attributes
and components of a bike and run simulations of a bicycle's behaviors in use.
You may wish to define other classes to model any components, such as wheels,
that have their own attributes and behaviors. (You may work on this exercise in pairs,
just let the TA know.)
Exercise 8.6 (explore, social/ethical): Do some research on the web to learn
about accessible web design. What legislation and court rulings mandate accessible
web design? What are a few techniques that web page designers can incorporate
to made their content more accessible to hearing- or visually-impaired users?
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.
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.)
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.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. (Prof Heflin offers a course on software agents.)
How about implementing the Game of Life in Flash with a graphical interface? This would
entail ActionScript imitating your C++ logic. (You may work on this exercise in pairs,
just let the TA know.)
Due: Monday, 12/8, anytime before midnight.
Hand in: Submit your homework here, in Blackboard.
Prof. Blank