السلام عليكم
شخباركم مع الجافا؟
لو سمحتو كنت ابي احد يشرحلي هل مسئله و يقولي شلون انحلت :s
راح تيي بالكويز و الكويز سبوع الياي :'(
و اذا تبون تشوفونها بالكتاب موجوده بيونت 4 بصفحه 31&32
ميرسي
[left:2mdgfb5d][2.5 Exercises and solutions
Exercise 2.1 __________________________________________________ _______________
Suppose that the library system used as an example in Block 4 and in this section is to
be rebuilt completely, taking on much more sophisticated requirements, as follows.
1 Members are assigned a status from which is derived what they can do in the
library and with its holdings.
2 Some library items are held on reserve and cannot be borrowed, but can be
requested for consultation within the library by members of suitable status.
3 Items can be photocopied by library staff, subject to copyright rules, and copies
sent to members of appropriate status.
4 The library has a number of branches with different specializations, and copies of
items may stored at a number of different branches.
5 Copies of items that are damaged, or items that have not been used, may be
withdrawn and given away to members.
Estimate the effort required for the development of this system.
Solution
The effort estimation requires that we know the use cases and classes involved.
The seven original use cases (listed by actor) are:
Member:
reserve book
Librarian:
reserve book
update catalogue
issue copy of book
return copy of book
enrol new member
Browser:
look through catalogue
To these must be added six new use cases:
Member:
request reserved item
request photocopy of item
select withdrawn item
Librarian:
register status of user
photocopy item for user and send it to them
withdraw item from library
The three original classes are Book, Loan, and Member.
To these must be added another five classes: ReserveItem, BorrowerStatus,
LibraryBranch, WithdrawnItem, Photocopy.
The new use cases are not as complex as the original ones (which were weighted at
seven), so we shall weight them at five. So the FP contribution for the new use cases is
6 × 5 = 30, which added to the contribution of 42 for the original use cases gives an
overall FP contribution for the use cases of 30 + 42 = 72.
The new classes are just as simple as the original ones, so we shall weight them at nine
too, giving an FP contribution of 5 × 9 = 45 for the new classes and an overall FP
contribution for the classes of 45 + 27 = 72.
This then gives an FP value of 72 + 72 = 144.
The complexity adjustment needs to be a little bit higher than previously because of
the addition of branches and hence a distributed system. If we give this complexity
factor an Fi value of 5, the total of the Fi values becomes 5 + 25 = 30 and so we have
FPadjusted = 144 × (0.65 + 0.01 × 30) = 144 × 0.95 = 136.8.
Hence, using Table 2.1, this suggests about 4100 lines of OO code.
Using Basic COCOMO and assuming an exceptionally simple organic system (as in
the earlier example), the parameters of Table 2.2 suggest that the effort required is
about
E = 2.4 × 4.11.05
≈ 10.5 person-months[/left:2mdgfb5d]