class design n.
Skip this Video
Loading SlideShow in 5 Seconds..
Class Design PowerPoint Presentation
Download Presentation
Class Design

Loading in 2 Seconds...

play fullscreen
1 / 15

Class Design - PowerPoint PPT Presentation

  • Uploaded on

Class Design. Class Design. The analysis phase determines what the implementation must do, and the system design phase determines the plan of attack. The purpose of class design is to complete the definitions of the classes and associations and choose algorithms for operations.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Class Design' - alphonse

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
class design

Class Design

class design1
Class Design
  • The analysis phase determines what the implementation must do, and the system design phase determines the plan of attack. The purpose of class design is to complete the definitions of the classes and associations and choose algorithms for operations.
  • The analysis model describes the information that the system must contain and the high-level operations that it mush perform. During design, you choose among different ways to realize the analysis classes with an eye toward minimizing execution time, memory, and other cost measures. In particular, you must flesh out operations choosing algorithms and breaking complex operations into simpler operations.

class design2
Class Design
  • OO design is an iterative process. When you think that the class design is complete at one level of abstraction, you should consider the next lower level of abstraction. For each level you need to add new operations, attributes and classes. Class design involves the following steps.
  • Bridging the Gap

How to allocate available resources to the desired features. Your job is to build a bridge across the GAP. You must invent some intermediate elements to bridge the gap (operations, classes or other UML constructs). Inventing good intermediate elements is the essence of successful design.

class design3
Class Design

class design4
Class Design
  • Realizing Use Cases

During class design we elaborate the complex operations, most of which come from use cases. Use cases define system-level behavior. During design you must invent new operations and new objects that provide this behavior.

  • Designing Algorithms.

Formulate algorithm for each operations. The analysis specification tells what the operation does for its clients.

Steps to design algorithms are as follows.

class design5
Class Design
  • Choosing Algorithms that minimize the cost of implementing operations
    • Computational Complexity
    • Ease of implementation and understandability
    • Flexibility
  • Select Data Structures appropriate to each algorithms
  • Define new internal classes and operations necessary

Decomposition of high-level operations. Usually you need to add internal operations as you expand high-level operations.

  • Assign Operations to appropriate classes

class design6
Class Design
  • Recursing Downward

Organize operations as layers. Operations in the higher layers invoke operations in lower layers. The design process generally works top-down. Download recursion proceeds in tow ways:

  • Functionality Layers.

Functionality recursion means that you take the required high-level functionality and break it into lesser operations. This is a natural way to proceed.

  • Mechanism Layers.

This means you build the system out of layers of need support mechanisms. In providing functionality, you need various mechanisms to store information, sequence control, coordinate objects, transmit information, etc.

class design7
Class Design
  • Refactoring

The changes to the internal structure of the software to improve its design without altering its external functionality. It may seem like a waste of time, but it is essential to main a design.

  • Design Optimization

A good way to design the system is to get the logic and then optimize it. It is difficult to optimize a design at the same time you create it. Design optimization involves the following paths.

    • Provide efficient access paths
    • Rearrange the computation for greater efficiency
    • Save intermediate results to avoid recomputations

class design8
Class Design
  • Reification of Behavior

It is the promotion of something that is not an object into an object.

  • Adjustment of Inheritance

As class design progresses, you can often adjust the definitions of classes and operations to increase inheritance by performing the following steps.

    • Rearrange classes and operations to increase inheritance
    • Abstract common behavior out of groups of classes
    • Use delegation to share behavior when inheritance is semantically invalid.

class design9
Class Design
  • Organizing a Class Design

It is possible to improve the organization of a class design with the following steps.

    • Hide Internal information from outside view
      • Limit the scope of class-model traversals
      • Do not directly access foreign attributes
      • Define interfaces at a high level of abstraction
      • Hide external objects
      • avoid cascading method calls
    • Maintain coherence of entities
    • Fine-tune definition of packages

implementation modeling
Implementation Modeling
  • Implementation is the final development stage that addresses the specifics of programming languages. Implementation should be straightforward and almost mechanical, because you should made all the decisions during design.
  • First you should address implementation issues called implementation modeling, which involves fine-tune classes, fine-tune associations, realize associations and prepare for testing.
  • First two are motivated by the theory transformations. A transformation is a mapping from domain of models to the range of models.

implementation modeling1
Implementation Modeling
  • Fine-tuning Classes

Sometimes it is helpful to fine-tune classes before writing code in order to simplify development or to improve performance. The purpose of implementation is to realize the models from analysis and design. Do not alter design model unless there is a compelling reason. If there is, consider the following possibilities. Partition a class, Merge classes, Partition/Merge attributes or Promote an attribute/demote a class.

  • Fine-tuning Generalizations

As you can reconsider classes, so too you can reconsider generalizations. Sometimes it is helpful to remove a generalization or to add one prior to coding.

implementation modeling2
Implementation Modeling
  • Realizing Associations

Associations are the ‘glue’ of the class model, providing access paths between objects. Now we must formulate a strategy for implementing them. Either we can choose a global strategy for implementing all associations uniform, or we can select a particular technique for each associations, taking into account the way the application will use it. We to consider association classes, ordered associations, sequences, bags, qualified associations, aggregation and composition

implementation modeling3
Implementation Modeling
  • Testing

Testing is a quality assurance mechanism for catching residual errors. It provides an independent measure of the quality of your software. Testing should progress from small pieces to ultimately the entire application. Developers should begin by testing their own code, their classes and methods (Unit testing). Testing the fitness of classes and methods together (Integration testing). The final step is system testing, where you check the entire application.


Thank you....!!!