CSE10: Introduction to Computing
Assignment #6 (Chapters B and 5)

This week's labs will focus on Control Structures (chapter B).  Last week you went through the multimedia for Computer Architecture (chapter B). This week's lab quiz and assignment will combine these two units.

This week's lab:

Homework exercises (hand in .java source code for any programming exercises):
The final project for CSE14 will be to implement the card game of "war" in Java.  As part of this students, both CSE13 and CSE14 students will develop a set of use cases (just the textual form) describing how to play this game.   You may work in pairs on this problem.
CSE13: exercises 5.2(second question), 5.3, 5.4, 5.5, 5.16, 5.39, B.4, B.11(b,e,f), B.19(b,d,f), B.25 (in H:\ucomp\chapB\Pay), B.55,B.56,NegCubes.java and SentinelString.java.
CSE14: exercises 5.2(second question), 5.3, 5.4, 5.5, 5.16, 5.39, B.4, B.11(b,e,f), B.19(b,d,f), B.23(a,d), B.25 (in H:\ucomp\chapB\Pay), B.55,B.56, NegCubes.java, Powers.java, SentinelString.java and LoopBugs.java.

Note about pair programming: You may work in pairs on any of the programming exercises as well as the "war" use case exercise.  As with the previous assignment, pair programming (see chapter 4, page 18, exercise 4.14) is optional, but you must follow the procedure outlined in chapter 4, page 18, working together at one computer, one partner coding, the other partner critiquing), and you declare your partners in a comment at the top of each program. For all programs that you work on as pairs, make sure your programs includes the names of both programmers in the comments; one person can submit the program, while the other person just includes a note in their file giving their partner's name for the exercises they worked on together. No "pair" work for non-programming exercises: for these, do and submit your own work.

Extra credit: exercises 5.19, 5.49, B.2 and B.31 (show both), B.28, or B.62

Due: Sunday, 11/3, anytime before noon.  Put a hard copy of your work, stapled or in a binder, in Packard Lab 104, on the left.  (Slide it under the door if it's closed.)

Hints:
For 5.2, explain how each instruction changes the value of which register.  E.g., STO 2 would change register 2 to 6.  By "second question," I mean "What would the effect be if theare are executed sequentially in that order?" I.e., first STO 7; then RCL 2; etc., with the state of the machine changing after each instruction.

For 5.39, chapter B, page 7, after reviewing truth tables, discusses the difference between inclusive and exclusive or.

B.10(b,e), see the ASCII table in Figure A.10.

For B.62, take a look C:\ucomp\chapB\InFile, notably themain method.

Prof. Blank