מבוא להנדסת תוכנה

Download Report

Transcript מבוא להנדסת תוכנה

Ex_8.1/7
Exercise 8
Reuse
Exercise – Reuse
Ex_8.2/7
1. A code module is reused, unchanged in a new
product.
– In what ways does this reuse reduce the overall cost of
the product?
– In what ways is the cost unchanged? ,
2. Suppose that there is a minor change: an addition
operation is changed to a subtraction.
How does this minor change the results of the
previous question?
Reuse and…
Ex_8.3/7
3. What is the influence of cohesion on reusability?,
4. What is the influence of coupling on reusability? ,
5. How early in the SW life cycle could the
developers have caught the fault in the Ariane 5
SW?
Portability and…
Ex_8.4/7
6. Your organization is developing a real-time control
system for a new type of a laser that will be used in
cancer therapy.
You are in charge of writing two assembler modules.
How will you instruct your team to ensure that the
resulting code will be as portable as possible?
ATM …
7.
Ex_8.5/7
Consider an Automated Teller Machine (ATM). The
user puts a card into a slot and enters a four-digit
Personal Identification Number (PIN).
If the PIN is incorrect, the card is ejected.
Otherwise, the user may perform the following
operations on up to four different bank accounts:
(I)
Deposit any amount. A receipt is printed showing the date,
amount deposited, and account number,
(II) Withdraw up to 200$ in units of 20$ (the account may not
be overdrawn). In addition to the money, the user is given
a receipt showing the date, amount withdrawn, account
number, and account balance
after the withdrawal.
ATM (Cont’d)
Ex_8.6/7
(III) Determine account balance. This is displayed on the
screen,
(IV) Transfer funds between two accounts. Again, the account
from which the funds are transferred must not be
overdrawn. The user is given a receipt showing the date,
amount transferred, and the two accounts numbers,
(V) Quit. The card is ejected,
Explain how would you ensure hat as many products’
modules as possible can be used in future products.
Ex_8.7/7
Exercise 8
Reuse
The End.