1. Trang chủ
  2. » Công Nghệ Thông Tin

Giới thiệu phân tích và thiết kế hướng đối tượng

22 243 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 22
Dung lượng 583,05 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

SDLC is a disciplined and systematic approach that divides the software development process into various phases, such as requirement analysis, design, and coding.. Some of these approach

Trang 1

Software systems for enterprises need to be designed after

an in-depth analysis As software systems become more

and more complex, it becomes increasingly difficult to

correctly analyze the requirements and convert them into

an appropriate design Therefore, tools are required to deal with this complexity Object-Oriented Analysis and

Design (OOAD) provide you the necessary tools to

analyze and design complex software systems

This chapter introduces the various phases of the software development life cycle (SDLC) and discusses the various software development approaches Then, it discusses the

object-oriented concepts and explains the role of OOAD

in software development

In this chapter, you will learn to:

 Identify the various software development

approaches

 Identify the role of OOAD in SDLC

Objectives

Trang 3

Before the acceptance of software development as an engineering stream, the process of developing software was an ad hoc activity with no formal rules or standards As a result, software projects faced serious problems in terms of schedule slippage, cost overrun, and inferior quality of software

SDLC was introduced to address the problems faced during the software development process SDLC is a disciplined and systematic approach that divides the software

development process into various phases, such as requirement analysis, design, and

coding The phase-wise development process helps you track schedule, cost, and quality

of the software projects

There are six phases in SDLC:

„ Feasibility analysis: Includes analysis of project requirements in terms of input data

and desired output, processing required to transform input into output, cost-benefit analysis, and schedule of the project The feasibility analysis also includes the technical feasibility of a project in terms of available software tools, hardware, and skilled software professionals At the end of this phase, a feasibility report for the entire project is created

„ Requirement analysis and specification: Includes gathering, analyzing, validating,

and specifying requirements At the end of this phase, the Software Requirement Specification (SRS) document is prepared SRS is a formal document that acts as a written agreement between the development team and the customer SRS acts as input to the design phase and includes functional, performance, software, hardware, and network requirements of the project

„ Design: Includes translation of the requirements specified in the SRS into a logical

structure that can be implemented in a programming language The output of the design phase is a design document that acts as an input for all the subsequent SDLC phases

„ Coding: Includes implementation of the design specified in the design document into

executable programming language code The output of the coding phase is the source code for the software that acts as input to the testing and maintenance phase

„ Testing: Includes detection of errors in the software The testing process starts with a

test plan that recognizes test-related activities, such as test case generation, testing criteria, and resource allocation for testing The code is tested and mapped against the design document created in the design phase The output of the testing phase is a test report containing errors that occurred while testing the application

Overview of SDLC Phases

Understanding Software Development Life Cycle

(SDLC)

Trang 4

„ Maintenance: Includes implementation of changes that the software might undergo

over a period of time, or implementation of new requirements after the software is deployed at the customer location The maintenance phase also includes handling the residual errors that may exist in the software even after the testing phase

Different types of projects have different requirements Therefore, it may be required to tailor the SDLC phases according to the specific needs of the project This gives rise to various software development approaches Some of these approaches are:

The waterfall approach is the earliest approach that was used for software development Initially, most projects followed the waterfall approach because they did not focus on changing requirements

The waterfall approach defines the software development process in seven phases:

„ Conception: Triggers when a problem is perceived This phase involves identifying

goals to be achieved after the problem is solved, estimating benefits in the new system over the current system, and identifying other areas that are affected by the solution This phase also involves developing the business case for the project A business case provides the information that a manager needs to decide whether to support a proposed project, before resources are committed to its development

„ Initiation: Involves a macro level study of the customer requirements This phase

also involves defining alternative solutions to the customer requirements and cost-benefit justification of these alternatives

„ Analysis: Involves carrying out a detailed study of the customer requirements and

arriving at the exact requirements of the proposed system The phase involves

Software Development Approaches

Trang 5

„ Design: Involves translating the identified requirements into a logical structure,

called design that can be implemented in a programming language

„ Construction: Involves converting the design into a machine-readable form

„ Integration and testing: Involves integrating and testing all the modules developed

in the previous phase as a complete system

„ Implementation and maintenance: Involves converting the new system design into

operation This may involve implementing the software system and training the operating staff before the software system is functional

The following figure shows the various phases in the waterfall approach

Waterfall Approach

The waterfall approach assumes that requirements are stable and frozen across the project plan However, this is usually not true in case of large projects where requirements may evolve across the development process

Implementation and Maintenance

Trang 6

Prototyping Approach

The prototyping approach, also known as evolutionary approach, came into picture

because of failures that occurred in the final version of the software application developed using waterfall approach The failures generally occurred because of the change in

requirements of the proposed system or because of the gap in understanding the customer requirements by the development team A gap in the first version of a developed

application, inevitably leads to the need for redoing the application To overcome these limitations, the concept of prototyping was introduced

A prototype is a sample implementation of the system that shows limited and main

functional capabilities of the proposed system After a prototype is built, it is delivered to the customer for evaluation The prototype helps the customer determine how the features will function in the final software The customer provides suggestions and improvements

on the prototype The development team implements the suggestions in the new

prototype, which is again evaluated by the customer The process continues until the customer and the development team understands the exact requirements of the proposed system When the final prototype is developed, the requirements are considered to be frozen

The prototyping approach is used in the requirements gathering and analysis phase to capture the exact requirements of the proposed system After the requirements are frozen, the remaining phases of the development process need to be executed to complete the development of the software system

An e-commerce Web site, such as a shopping site, is an example where you can

implement the prototyping approach You can develop a prototype of the various Web pages of the shopping site, such as catalogue page, product order page, and credit card authentication page, and present it to the customer for approval If the customer approves the prototype of the site, requirements are stated again and the design of the Web site is initiated If the customer does not approve the Web site, the development team revisits the prototype and resubmits it to the customer for approval This process continues until the prototype is approved

Prototypes are of two types:

„ Throwaway prototypes: Prototypes that are eventually discarded rather than

becoming a part of the finally delivered software Examples of throwaway prototypes include screen mock-ups and storyboards

„ Evolutionary prototypes: Prototypes that evolve into the final system through

iterative incorporation of user feedback

Trang 7

Although prototyping is a very useful technique to obtain accurate requirements of the system and to speed up the development process, it has some disadvantages associated with it Some disadvantages of prototyping are:

„ It gives clients the false impression that a few minor changes to the prototype will give them the required system

„ It may compromise on the overall quality of the software in the rush to develop the prototype For example, the developer may use inefficient algorithms or inappropriate programming languages for developing the prototype quickly and the same may find place in the final application thus leading to inefficient code running

in the final application

Spiral Approach

The spiral approach includes the iterative nature of the prototyping approach and the linear nature of the waterfall approach This approach is ideal for developing software that are released in various versions

In each iteration of the spiral approach, software development process follows the

phase-wise linear approach At the end of first iteration, the customer evaluates the

software and provides the feedback Based on the feedback, software development

process enters into the next iteration and subsequently follows the linear approach to implement the feedback suggested by the customer The process of iteration continues throughout the life of the software

An example of a spiral approach is the evolution of Windows operating system from Window 3.1 to Windows 2003.You may refer to Windows 3.1 operating system as the first iteration in the spiral approach The product was released and evaluated by the

customers, which include the market at large After getting the feedback from customers about Windows 3.1, Microsoft planned to develop a new version of Windows operating system Windows 95 was released with enhancements and graphical flexibility Similarly, other versions of Windows operating system were released

The spiral approach includes six phases:

„ Customer communication: Includes understanding the system requirements by

continuous communication between the customer and the system analyst

„ Planning: Includes estimating schedule, cost, and resource for the iteration

„ Risk analysis: Includes identifying, estimating, and monitoring technical and

management risks, such as schedule slippage and cost overrun

„ Engineering: Includes requirement gathering and design of the software system

„ Construction and release: Includes coding, testing, and deploying software at the

customer site and providing user-support documents

„ Customer evaluation: Includes evaluation of software by the customer and

implementing feedback in the next iteration of the software development

Trang 8

The following figure shows the various phases in the spiral approach

Spiral Approach

Win-Win Spiral Approach

The win-win spiral approach is an extension of the spiral approach The phases in this approach are same as the phases in the spiral approach The only difference is that at the time of identifying the requirements, the development team and the customer hold

discussions and negotiate on the requirements that need to be included in the current iteration of the software

The approach is called win-win because it is a winning situation for the development team and also for the customer The customer wins by getting the product that fulfills most of the requirements while the development team wins by delivering software which is developed with all the requirements established after negotiations with the customer The win-win spiral approach is generally used when you have time-bound releases

Trang 9

Incremental Approach

In an incremental approach, software requirements are broken down into various

functional units These functional units contain a group of similar tasks A project activity list is created to prioritize the functional units with various activities to be performed in each functional unit Each functional unit is implemented in an increment and the final product is achieved after all the functional units are implemented in the development process

Each increment includes three phases: design, implementation, and analysis During the design phase of the first increment, the functionality with topmost priority from the project activity list is selected and the design is prepared In the implementation phase, the design is implemented and tested In the analysis phase, the functional capability of the partially developed product is analyzed The development process is repeated until all the functions of the project are implemented The following figure shows the incremental approach with various phases

Incremental Approach

Consider an example where a bank wants to develop software to automate the banking process for insurance services, personal banking, and home and automobile loans The bank wants the automation of personal banking system immediately because it will enhance the customer services You can implement the incremental approach to develop the banking software In the first increment, you can implement the personal banking feature and deliver it to the customer In the later increments, you can implement the insurance services, home loans, and automobile loans features of the bank

The limitation of the incremental approach is that it is applicable only to large

applications This is because it is difficult to break small projects into smaller functional increments

Increment n

Design Implementation Analysis

Trang 11

In the design phase of any software development approach, you can follow two

approaches to software development These are the function-oriented and object-oriented development approaches The function-oriented approach is the erstwhile approach that evolved before the object-oriented approach

The function-oriented approach is module-centric and concentrates on functions of the software This approach does not restrict the creation of modules that are tightly coupled and expose data to other parts of the program Therefore, software constructed using the function-oriented approach may be so tightly coupled and interdependent that it may be difficult to separate the construction of one module from another In addition, data may be visible and accessible throughout the program Reusability of the software in this case becomes difficult

The limitations of the function-oriented approach gave way to the evolution of the

object-oriented approach The fundamental idea behind object orientation is to portray things as they exist in the real world This helps to reduce the complexity of software systems OO approach introduces the concept of inheritance which allows reuse of

existing code components In addition, OO approach supports encapsulation of data, abstraction, and polymorphism The OO approach guides you to think in terms of

reusability and therefore, helps in creating a better design

The various OO concepts are:

„ Classes and objects: A class is an abstract data type that contains a set of attributes

and functions An object is an instance of a class All the objects share the same copy

of the member functions, but maintain a separate copy of the member data To understand classes and objects, consider the analogy of a car Cars such as BMW, Ferrari, and Chevrolet share certain similar features and, therefore, can be grouped to form the objects of the class, Cars

Understanding Object-Oriented Concepts

Overview of OO Concepts

Ngày đăng: 03/12/2015, 16:58

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w