Phân tích thiết kế hướng đối tượng - Chương 5.1 (HUST) GV.Phạm Ngọc Nam

LI
lienhejb
0 lượt tải
40
0

Nội dung tài liệu

Trang 1

goupee.vn TRƢỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI goupee.com KHOA ĐIỆN TỬ VIỄN THÔNG PHÂN TÍCH THIẾT KẾ HƢỚNG ĐỐI TƢỢNG CHƢƠNG 4. Thiết kế Bộ môn Điện tử tin học fb.com/goupee.vn04/2007 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 2

goupee.vn goupee.com Chƣơng 5. Triển khai  5.1. Xây dựng hệ thống  5.2. Cài đặt và vận hành fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 2 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 3

goupee.vn goupee.com Key Definitions  Construction: The development of all parts of the software itself, documentation, and new operating procedures.  Testing: A form of insurance. It’s cheaper to fix bugs earlier, rather than later.  Documentation: Provides information to make the system easier to use and maintain fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 3 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 4

Main Tasks of Managing the goupee.vn goupee.com Programming Effort Assigning the programmers Coordinating the activities Managing the schedule fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 4 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 5

goupee.vn goupee.com Assigning Programmers Start by looking at the package diagrams Assign similar modules to the same programmer Fewer programmers is normally better fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 5 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 6

goupee.vn goupee.com Coordinating Activities  Hold weekly project meetings  discuss changes to the system  discuss other issues of the past week  Create and follow standards  Set up separate workspace for  development, testing, production  as a minimum, separate files  Use change control  program log, sign-in/-out  Use CASE tools fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 6 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 7

goupee.vn goupee.com Managing the Schedule  Use initial time estimates as a baseline  Revise time estimates as construction proceeds  Fight against scope creep  Monitor “minor” slippage  Create risk assessment and track changing risks  Risks change as deadline approaches  Fight the temptation to lower quality to meet unreasonable schedule demands fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 7 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 8

goupee.vn goupee.com Avoid Classic Mistakes 1. Research-oriented development If you use state-of-the art technology, lengthen planned time 2. Using “low-cost” personnel You get what you pay for. If using a significant number of entry level personnel, lengthen planned time 3. Lack of code control Use source code library to keep programmers from changing the same code at the same time. Why? 4. Inadequate testing Always allocate sufficient time for formal testing fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 8 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 9

goupee.vn goupee.com Designing Tests fb.com/goupee.vn CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 10

goupee.vn goupee.com Designing Tests Testing can never prove there are no errors The purpose is not to demonstrate that the system is free of errors The purpose is to detect as many errors as possible Question:  What are considered good test results? fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 10 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 11

goupee.vn goupee.com Testing Philosophy It is dangerous to test early modules without an overall testing plan It may be difficult to reproduce sequence of events causing an error Testing must be done systematically and results documented carefully fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 11 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 12

goupee.vn goupee.com Error Discover Rates fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 12 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 13

goupee.vn goupee.com Testing and Object-Orientation  Encapsulation and information hiding  Attributes and actions are combined and hidden  This makes testing hard  So you need to test the business process represented by use cases  Polymorphism and dynamic binding  Don't know ahead of time which method will be bound at run time  Rather than testing individual classes Focus on the class as the smallest unit of testing  Reuse  When code is reused in a different context  It must be re-tested fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 13 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 14

goupee.vn goupee.com Testing and Object-Orientation Inheritance  If you find a bug in a class you don't know if it came from an ancestor class  If so, you may see the same bug in sibling classes OO Development process and products  Test all deliverables of the process  Even the non-executable ones  Can do this with a walk through fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 14 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 15

goupee.vn goupee.com Test Planning  Address all products created during development  So develop test plan early  Example, test completeness of CRC cards  Each test:  Has as specific objective  Has specific test cases to examine  Uses test specifications  If the tested class requires methods that aren't ready  Use stubs (hard coded fake methods) fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 15 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 16

goupee.vn goupee.com Stages of Testing  Unit testing  Tests each module to assure that it performs its function  Integration testing  Tests the interaction of modules to assure that they work together  System testing  Tests to assure that the software works well as part of the overall system  Acceptance testing  Tests to assure that the system serves organizational needs fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 17 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 17

goupee.vn goupee.com Unit Testing Tests a single unit (a class) Black Box Testing  Most common  Looks just at inputs and outputs  Tests whether the unit meets requirements stated in specification fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 18 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 18

goupee.vn goupee.com Unit Testing White-Box Testing  Looks inside the module to test its major elements  Limited usefulness in OO design because units are so small Unit tests based on CRC cards, state diagrams Pre and Post conditions fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 19 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 19

goupee.vn goupee.com Integration Testing After the classes pass unit tests Test classes that must work together fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 20 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Trang 20

goupee.vn goupee.com Integration Testing Four types of Integrating tests User interface testing Tests each interface function Move through each menu/screen Use-case testing Ensures that each use case works correctly Step through each use case Often combined with UI testing fb.com/goupee.vn October 20 OOD - DEI.FET.HUT 21 CuuDuongThanCong.com https://fb.com/tailieudientucntt

Hiển thị 20 trang đầu. Tải tài liệu để xem đầy đủ.

Bình luận (0)

Đăng nhập để tham gia bình luận

Chưa có bình luận nào. Hãy là người đầu tiên!