CSE143
Miniquiz 03
January 15, 2003

1 point per part; no partial points  (12 total)

Time allowed: 6 minutes

Answers are in red boldface

[On T/F questions, please answer by circling the T or the F.]

1 (2 pts.) In Project 1, interfaces are given for which two types of things?  Circle your answers.

checkout counter, deity, entrance, exit, omen, oracle, purchase order, shopping mall, store, temple

2. T / F For Project 1, you are given code for a method which reads a file and places the text in an array.

3. T / F For Project 1, you are given code for main that is just a sample; you can change it if you desire.

4. Interfaces are often used to model (circle one) is-a relationships / has-a relationships

5. Inheritance is often used to model (circle one) is-a relationships  / has-a relationships

6. Composition (aggregation) is often used to model (circle one) is-a relationships / has-a relationships

7. (4 points) Suppose you are at a design review (a meeting where programmers get together to discuss each other's designs and programs).  One programmer says, "A and B implement C, and D extends B".  Everyone nods in understanding.  Then they all look at you.  Convince them that you understand, too.  Draw 4 boxes, one each for A, B, C, and D, and draw appropriate arrows between them to indicate their relationships.  If you are unsure of the official notation, write a short note or label on each arrow to explain.

Draw C highest on the page, then A and B below C, then D below that.

3 arrows, from A to C, from B to C, D to B

 

8. Which one of the statements below (or words to that effect) appear in the 143 syllabus?  Circle A or B

           A. Late homework will not be accepted.

            B. Late homework will not be accepted, unless of course if the turn-in form wasn't available when I was ready for it, and then I forgot all about it until after the deadline.

.