Example Design Case Study for SW Engineering The



















- Slides: 19
Example Design Case Study for SW Engineering “The Osbert Oglesby Case Study”
Initial Understanding of Case Osbert Oglesby, Art Dealer, needs a software product to assist him in buying and selling paintings Obtaining domain knowledge is the first step Osbert is interviewed to obtain the relevant information
Customer Osbert wants a software product, running on his laptop computer, that will Determine the maximum price he should pay for a painting Detect new trends in the art market as soon as possible To do this, the software product needs to keep a record of all purchases and all sales
How do we start many options to describe Requirements (from Alistair Cockburn : outline for functional requirements) 1. purpose and scope (a description) 2. terms / glossary 3. use cases (the central artifact of requirements) 4. technology used 5. other 5 a. development process -participants, values (fast-good-cheap), visibility, competition, dependencies 5 b. business rules / constraints 5 c. performance demands 5 d. security (now a hot topic), documentation 5 e. usability 5 f. portability 5 g. unresolved / deferred 6. human issues: legal, political, organizational, training
The Osbert Oglesby Case Study Buy Attributes when buying a painting include: Title of work, name of artist, date of painting, classification, medium, purchase price, name and address of seller (The complete list of attributes appears in the textbook in Figure 10. 14 — see over) Attributes when selling a painting are: Date of sale, name of buyer, address of buyer, actual selling price
Buy Use Case very vague Let’s refine Attributes when buying a painting include: – Title of work, name of artist, date of painting, classification, medium, purchase price, name and address of seller Attributes when selling a painting are: – Date of sale, name of buyer, address of buyer, actual selling price
Buy Use Case need maximum purchase price FIRST: Classify the painting as a Masterpiece Masterwork Other painting
Buy Use Case algorithm for a Masterpiece Scan worldwide auction records over the past 25 years for the most similar work by the same artist • Use the auction purchase price of the most similar work as the base price The maximum purchase price is found by adding 8. 5 percent to the base price, compounded annually, for each year since that auction
Buy Use Case algorithm for a Masterwork Compute the maximum purchase price as if the painting were a masterpiece by the same artist If the picture was painted in the 21 st century, multiply this figure by 0. 25 Otherwise, multiply it by (21 – c)/(22 – c), where c is the century in which the work was painted (12 < c < 21)
Buy Use Case algorithm for a “other” Measure the dimensions of the canvas • The maximum purchase price is then given by the formula F x A, where F is a constant for that artist (fashionability coefficient), and A is the area of the canvas in square centimeters If there is no fashionability coefficient for that artist, Osbert will not buy the painting
Where will the system get some of the data? AUCTION SALES: The software product must utilize information on worldwide auction sales of masterpieces over the past 25 years Each month Osbert receives a CD with updated worldwide auction prices; these prices are never modified by Osbert FASIONABILITY CONSTANTS: Osbert determines the value of F on the basis of his knowledge and experience – He changes the value if prices for work by an artist increase or decrease
Lets collect all the information from previous slides UML Case Diagram DESCRIPTION for Buy Use Case Figure 10. 14
Continuing on…. we had some “classes” …lets start making a UML Class Diagram The high level –showing the relationships between classes (Paintings)
Wait its not quite right a masterwork has to have all the attributes of a masterpiece (so that its maximum purchase price can be computed as if it were a masterpiece) and, in addition, it may have attributes of its own
Wait what about pricing algorithm the pricing algorithm that is not reflected in the current class diagram is – “The software product computes the coefficient of similarity between each painting for which there is an auction record and the painting under consideration for purchase” Auctioned Painting Class is needed
Wait Fashionability Class needed It is used in the Other Painting class price calculations
Now we need to start adding in attributes of our classes This is just the start of this process but you get the idea
NOW we can iterate over the refinement of our use Cases AND supporting Class Diagrams So we might have something like this at one step in this process for our Use Cases
Remember we will also develop other UML diagrams like sequence diagrams This shows the transactions involved in a use case (or part of one) Alternative Sequence Diagram