Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 36 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
36
Dung lượng
1,25 MB
Nội dung
Object-Oriented Analysis and Design with Patterns, Process, and the UML Introduction Introduction Welcome! Introduction – Course leader: Dr Trần Vũ Bình – Participants: Hồ Thuỵ Hương Thuỷ (Tutor) Prerequisites: Object-Oriented Programming Logistics Overview and Objectives Learn how to “think in objects” Requirements and analysis of the problem domain Design of a solution – – – – Assign responsibilities to objects Design patterns Architectural issues Java, C# and/or C++ issues Unified Process UML Practice! Team work Software development is a team-oriented activity… Two assignments will work around the same project You need to work in the same team for both assignments Preferred team size: 3-5 students You can it by yourself Form your team as early as possible Hoa Sen University Team Project – Online Enrolment Your client: – Hoa Sen University Your goal: – Design a system to allow users to select appropriate course, arrange schedule as available Manage studied/failed courses according to curriculum Manage tuition set per course Display marks, GPA and report Taking the system online for student enrolment Hoa Sen University Project Task Assignment – Prepare requirement document – Write use cases – Develop Domain Model Assignment – Write Design Document – Implement the system (desktop version) – System Demo Hoa Sen University Software Visual Paradigm 6.3 Rational Rose – Installed on the lab PC Microsoft Visio Hoa Sen University What is OOAD? Lecture Hoa Sen University Today’s lecture topic Object oriented concepts revisited What’s OOAD? Functional decomposition and its problem What’s UML? Software Development Process Hoa Sen University What is Object-Oriented? What is object? What is class? What is instance? What is abstraction? What is inheritance? What is polymorphism? What is encapsulation? Hoa Sen University 10 Key Steps in OOAD [1] Use Case: a textual description or “story” describing the system Play a Dice Game: Player requests to roll the dice System presents results: If the dice face value totals seven, player wins; otherwise, player loses Hoa Sen University 22 Key steps in OOAD [2] a domain model that shows the noteworthy domain concepts or objects, attributes, and associations Player Rolls Die name faceValue Plays DiceGame Includes Hoa Sen University 23 Key steps in OOAD [3] Interaction Diagram: shows the flow of messages between software objects (method invocation) :DiceGame die1 : Die die2 : Die play() roll() fv1 := getFaceValue() roll() fv2 := getFaceValue() Hoa Sen University 24 Key steps in OOAD [4] Class Model: shows attributes, methods and associations for software (solution) objects (not domain objects!) DiceGame die1 : Die die2 : Die Die faceValue : int getFaceValue() : int roll() play() Hoa Sen University 25 Iterative and Evolutionary Development Iterative development – Development is organized into a series of short, fixed-length mini-projects called iterations – the outcome of each is a tested, integrated, and executable partial system – Known as iterative and incremental development Hoa Sen University 26 Iterative and evolutionary development Requirements Requirements Design Implementation & Test & Integration & More Design Final Integration & System Test Time Design Implementation & Test & Integration & More Design Feedback from iteration N leads to refinement and adaptation of the requirements and design in iteration N+1 Final Integration & System Test weeks (for example) Iterations are fixed in length, or timeboxed Hoa Sen University The system grows incrementally 27 Handle change on iterative project Early iterations are farther from the "true path" of the system Via feedback and adaptation, the system converges towards the most appropriate requirements and design In late iterations, a significant change in requirements is rare, but can occur Such late changes may give an organization a competitive business advantage one iteration of design, implement, integrate, and test Hoa Sen University 28 How long should an iteration be? Most iterative methods recommend an iteration length between two and six weeks Iteration are timeboxed, or fixed in length Date slippage is illegal If it seems difficult to meet the deadline, the recommended response is to de-scope – remove tasks or requirements from the iteration, and include them in a future iteration Hoa Sen University 29 How to Iterative and Evolutionary Analysis and Design? 20 software software In evolutionary iterative development, the requirements evolve over a set of the early iterations, through a series of requirements workshops (for example) Perhaps after four iterations and workshops, 90% of the requirements are defined and refined Nevertheless, only 10% of the software is built requirements Imagine this will ultimately be a 20iteration project requirements requirements workshops 90% 90% 50% 30% 20% 5% 2% Iteration Iteration 20% 10% 8% Iteration Iteration Iteration a 3-week iteration week M kickoff meeting clarifying iteration goals with the team hour T team agile modeling & design, UML whiteboard sketching hours week W Th start coding & testing F M T week W de-scope iteration goals if too much work Most OOA/D and applying UML during this period Hoa Sen University Th F M final check-in and codefreeze for the iteration baseline T W demo and 2-day requirements workshop Th F next iteration planning meeting; hours Use-case modeling during the workshop 30 Agile Methods and attitudes Agile development methods usually apply timeboxed iterative and evolutionary development, employ adaptive planning, promote incremental delivery and include other values and practices that encourage agility – rapid, and flexible response to change Example – programming in pairs – test-driven development Hoa Sen University 31 Agile Modelling Adopting an agile method does not mean avoiding any modelling The purpose of modelling and models is primarily to support understanding and communication, not documentation Don’t model or apply the UML to all or most of the software design Use the simplest tool possible Hoa Sen University 32 Agile modelling (cont) Don’t model alone Create models in parallel Use “good enough” simple notation while sketching with a pen on paper Know that all models will be inaccurate Developers themselves should the OO design modelling, for themselves, not to create diagrams that are given to other programmers to implement Hoa Sen University 33 Layers and textbook case study minor focus User Interface explore how to connect to other layers application logic layer other layers or components primary focus of case studies Sale Payment explore how to design objects Logging Database Access Hoa Sen University secondary focus 34 Case study strategy Iteration Iteration Introduces just those analysis and design skills related to iteration one Additional analysis and design skills introduced Hoa Sen University 35 Cases Case one: The NextGen POS system – A POS system is a computerized application used (in part) to record sales and handle payments – Hardware: computer, bar code scanner – Software – Interfaces to service applications: tax calculator, inventory control Case Two: The Monopoly Game System Hoa Sen University 36 ... University Project Task Assignment – Prepare requirement document – Write use cases – Develop Domain Model Assignment – Write Design Document – Implement the system (desktop version) – System... The purpose of modelling and models is primarily to support understanding and communication, not documentation Don’t model or apply the UML to all or most of the software design Use the simplest