Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Software Engineering one of core subject in Computer Science. This lecture was delived by Dr. Shrya Gopal at Bengal Engineering and Science University as one of lecture from lecture series on course. This lecture includes: Object-oriented, Design, Implementation, Requirements, Specification, Attributes, Idnetification, Candidate, Relation, Class, Members
Typology: Slides
1 / 25
Object-Oriented Design II
docsity.com
Your will have three presentations this semester Everybody in the team should present at least once
docsity.com
Believe that your software will be in use 5 years from now.
Packaging and hand-over Client's technical preferences (C++, Java)
docsity.com
Remember the definitions. Example: Consistency between two players of a board game
What is a requirements specification?
docsity.com
Given a real-life system, how do you decide what classes to use?
docsity.com
The library contains books and journals. It may have several copies of a given book. Some of the books are reserved for short-term loans only. All others may be borrowed by any library member for three weeks. Members of the library can normally borrow up to six items at a time, but members of staff may borrow up to 12 items at one time. Only members of staff may borrow journals.
The system must keep track of when books and journals are borrowed and returned and enforce the rules. docsity.com
The library contains books and journals. It may have several copies of a given book. Some of the books are reserved for short-term loans only. All others may be borrowed by any library member for three weeks. Members of the library can normally borrow up to six items at a time, but members of staff may borrow up to 12 items at one time. Only members of staff may borrow journals.
The system must keep track of when books and journals are borrowed and returned and enforce the rules. docsity.com
Library the name of the system Book Journal Copy ShortTermLoan event LibraryMember Week measure MemberOfLibrary repeat Item book or journal Time abstract term MemberOfStaff System general term Rule general term docsity.com
Book is an Item
Journal is an Item
Copy is a copy of a Book
LibraryMember
Item
MemberOfStaff is a LibraryMember
Is Item needed?
docsity.com
LibraryMember borrows Copy
LibraryMember returns Copy
MemberOfStaff borrows Journal
MemberOfStaff returns Journal
Item not needed yet.
docsity.com
MemberOfStaff
Journal Copy is a copy of Book
1..* 1
LibraryMember
on loan^ on loan
docsity.com
A wholesale merchant supplies retail stores from stocks of goods in a warehouse.
What classes would you use to model this business?
docsity.com
RetailStore
Warehouse
Order
Invoice
Product
Shipment
Merchant
docsity.com
Warehouse
Order
Invoice
Product
RetailStore^ Merchant
name address contactInfo financialInfo
Shipment
Responsibilities -track status of shipped products
Reversals
damaged() return() wrongItem()
responsibility (text field)
docsity.com
RetailStore 1 * Transaction
association
Invoice
Which class is Payment responsible for the financial records for a store?
docsity.com
Shipment
Invoice invoiceNumber +goodsShipped() -sendInvoice()
goodsShipped PartsList _adornments
- private
??? RetailStore
invoiceRecord
docsity.com
Design is empirical. There is no single correct design. During the design process:
The diagram is not the whole design. Diagrams must be backed up with specifications.
docsity.com
The complexity of a model depends on its level of abstraction:
Two approaches:
docsity.com
HelloWorld.class
hello.java
hello.hml
hello.jpg
executable component
docsity.com
Borrow book
BookBorrower
docsity.com
(e.g., librarian can have many roles)
(e.g., not librarian who processes book when borrowed)
In UML, the system boundary is the set of use cases.
docsity.com
Borrow copy of book
BookBorrower Return copy of book
Reserve book Extend loan docsity.com
BookBorrower
Check for reservation
Extend loan
<
<
Borrow copy of book
docsity.com
Borrow copy BookBorrower of book
Refuse loan
<
docsity.com
docsity.com