ENGR135 Take Home Midterm
HAVE to print out all the answers as well as the output and source
listings of the programming assignments. Please hand in both the printouts
and a diskette containing your programs. The exam is collected in class on
12/01/01. If you are late in any way, 50% will be taken off in the first
day, then 100% in the second day and after.
- If the
instructor cannot show up on 12/01/01, the exam will be collected in the
next lecture. This will only happen under extreme situation.
- DO NOT
talk about the exam, COMPARE the exam, DISCUSS the exam, WORK WITH OTHER
PEOPLE on the exam and CHEAT in any way you could think of. If two answers
are found to be the same due to cheating. An F will be given for the
course as a result and a letter might be sent to Dean of Students and the
Engineering Department. I do not want to do any of that, so LEARN the
materials and DO IT YOURSELF.
MID TERM QUESTIONS
exam will total to 200 points.
- If you
think the questions are not stated clearly in any way, WRITE down your
assumptions and answer the questions. No email answer can be obtained from
the instructor individually in order to be fair with all the students.
Luck and have fun.
(l1). List three ways of identifying Classes and Objects as
covered in lectures. (6 points)
(l2). What is the difference between Architecture Patterns
and Design Patterns? (4 points)
(l3). Draw a scenario diagram according to the Proxy design
pattern when a client needs to do a task with a Proxy system. (10 points)
All questions are from chapter 1 to chapter 5 of the
textbook: “Object-Oriented Systems Analysis and Design, Ronald J. Norman,
Prentice Hall”. Points are only awarded
when the answers are exact. So, read carefully.
(r1). One of the common theory object-oriented methodology
based on uses examples such as grouping trees into tree class or grouping
buildings into a building class. What is this method or theory called? (10
(r2). List all the forms of reuse and explain briefly what
they are. (10 points)
(r3). In general, what is a noun phrase strategy trying to
find? List the procedure of how to do a noun phrase strategy. (10 points)
(r4). In the Kozar’s requirement model, what does the
“Tactics & Needs” stage do? (10 points)
(r5). What is an automated information system? (10
(i1). Develop an object model,
including classes and attributes of the following "copy machine"
problem. You can make reasonable assumptions. (20 points)
- The machine copies A4 size paper only.
- If the original is too big, the machine will
indicate a warning of size mismatch.
- The machine can do either black & white or
- The price for black & white is 25 cents and
color is $1.
- Users can select how many copies to be done.
- Users have to input money first before any copy
can be done.
- The machine accepts only quarters. Other coins
are immediately returned.
- An error message will be displayed if the money
inputted is not enough.
- Quarters exceeding the cost of copying are also
returned when the copy button is pressed.
- The vending machine has two buttons, a black
& white copy button and a color copy button.
- (This is the same as the in-class exercise, so
you should remember what it kind of looks like. However, you should redo
the object model one more time as an individual to make sure that you are
able to implement it by yourself.
Also, remember that you have to do the whole midterm including this
problem by yourself.)
(i2). Draw a Global State
Transition Diagram (STD) for i1. (10 points)
(i3a). Use any
programming language (Java, C++, C) to implement the object model in part 1. If
the object model does not include a client or user, implement a client that
uses a text menu to operate the copy machine. For example:
Copy Machine Menu:
- Deposit money
- Press Black/White button
- Press Color button
- etc …
I will use the
above menu to grade this part of the question. (90 points)
(i3b). Write down 5 detail test
cases on how to test your implementation in i3a. (10 points)