0% found this document useful (0 votes)
17 views4 pages

Swe 5

Uploaded by

suchismitabose29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

Swe 5

Uploaded by

suchismitabose29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

‭ bject-Oriented Analysis, Design, and‬

O
‭Construction‬
‭Concepts‬

‭1.‬ ‭ rinciples of Abstraction, Modularity, Specification,‬


P
‭Encapsulation, and Information Hiding:‬

‭1.‬ A
‭ bstraction‬‭: Focuses on exposing only the necessary‬‭details of an object while‬
‭hiding the complex background. Simplifies design by reducing complexity and‬
‭allowing designers to focus on higher-level problem-solving.‬

‭ or example, using a car involves knowing how to drive, not the engine‬
F
‭mechanics. In software, abstraction enables developers to build complex systems‬
‭using simpler interfaces, creating models representing real-world entities in a‬
‭simplified manner.‬

‭2.‬ M
‭ odularity‬‭: Involves dividing a software system into‬‭independent modules that‬
‭can be developed, tested, and maintained separately. Each module has a specific‬
‭responsibility and interacts with others via well-defined interfaces. This enhances‬
‭maintainability, scalability, and reusability.‬

‭ or instance, separating user interface, business logic, and database‬


F
‭access in a web application. Modularity allows parallel development, reducing‬
‭time and improving code organization.‬

‭3.‬ S
‭ pecification‬‭: Defines what a module or component‬‭should do without‬
‭specifying how it does it. Typically done using interfaces or abstract classes‬
‭describing expected behavior. This allows for different implementations as long‬
‭as they adhere to the specification, acting as a contract between system parts.‬
‭This separation of interface and implementation facilitates changes and‬
‭maintenance without affecting other parts of the system.‬

‭4.‬ E
‭ ncapsulation‬‭: Bundles data (attributes) and methods‬‭(functions) into a single‬
‭unit or class. It restricts direct access to some components, essential for‬
‭protecting the object's integrity.‬
‭For example, making class variables private and providing public methods‬
‭for access and modification. Encapsulation helps maintain data control, ensuring‬
i‭t's not modified unexpectedly. It enhances security and prevents external‬
‭interference.‬

‭5.‬ I‭nformation Hiding‬‭: Hides internal details of a module‬‭or object from the outside‬
‭world, exposing only necessary aspects through a controlled interface. This‬
‭reduces system complexity and increases robustness by preventing external‬
‭components from relying on internal details.‬

‭ or example, exposing a method to get a user's age but hiding how it's‬
F
‭calculated or stored. Information hiding reduces the impact of implementation‬
‭changes on other system parts.‬

‭2.‬ ‭Concepts of Abstract Data Type (ADT)‬‭:‬

‭ n ADT is a mathematical model of a data structure specifying the type of data‬


A
‭stored and the operations that can be performed on it, without detailing implementation.‬
‭Examples include lists, stacks, queues, and sets. ADTs provide a clear interface,‬
‭allowing changes to underlying implementation without affecting code using the ADT.‬

‭3.‬ ‭Class Responsibility Collaborator (CRC) Model‬‭:‬

‭ brainstorming tool in the design phase to assign responsibilities and‬


A
‭collaborations to different classes in an object-oriented system. CRC models help‬
‭identify necessary classes, define responsibilities, and determine interactions, promoting‬
‭a clear understanding of system structure and class roles.‬

‭4.‬ ‭Quality of Design‬‭:‬

‭ good design should be maintainable, scalable, reusable, and efficient, following‬


A
‭SOLID principles and design patterns. Maintainability ensures easy modification and‬
‭extension. Scalability ensures handling increased load without performance issues.‬
‭Reusability allows component use in different system parts or projects. Efficiency‬
‭ensures optimal resource use.‬

‭5.‬ ‭Design Measurements‬‭:‬

‭Metrics evaluate design quality, such as coupling, cohesion, complexity, and readability.‬
‭●‬ ‭Coupling‬‭: Measures interdependence between modules;‬‭lower coupling‬
‭indicates a modular, flexible system.‬
‭●‬ ‭Cohesion‬‭: Measures relatedness of responsibilities‬‭within a module; higher‬
‭cohesion indicates a well-defined module purpose.‬
‭●‬ ‭Complexity‬‭: Assesses difficulty in understanding and‬‭maintaining code.‬
‭●‬ ‭Readability‬‭: Evaluates ease of reading and understanding‬‭code by developers.‬
‭6.‬ ‭Concepts of Design Patterns‬‭:‬

‭ eusable solutions to common software design problems, such as Singleton, Factory,‬


R
‭Observer, Strategy, and Decorator patterns. Design patterns offer proven solutions,‬
‭reducing development time and effort, promoting best practices, and improving‬
‭developer communication with a common vocabulary for design solutions.‬

‭Refactoring‬‭:‬

I‭mproving existing code design without changing external behavior. Refactoring‬


‭enhances maintainability, readability, and efficiency by restructuring code, eliminating code‬
‭smells, and applying design patterns. Techniques include renaming for clarity, extracting‬
‭methods to reduce duplication, and reorganizing code to follow best practices.‬

‭Object-Oriented Construction Principles:‬

‭●‬ ‭SOLID Principles‬‭:‬


‭○‬ ‭Single Responsibility‬‭: A class should have one reason‬‭to change.‬
‭○‬ ‭Open/Closed‬‭: Classes should be open for extension‬‭but closed for modification.‬
‭○‬ ‭Liskov Substitution‬‭: Subtypes must be substitutable‬‭for their base types.‬
‭○‬ ‭Interface Segregation‬‭: Clients should not be forced‬‭to depend on methods they‬
‭do not use.‬
‭○‬ ‭Dependency Inversion‬‭: Depends on abstractions, not‬‭concretions.‬

‭●‬ D
‭ RY (Don't Repeat Yourself)‬‭: Avoid code duplication‬‭by abstracting common‬
‭functionality, reducing redundancy, and making code easier to maintain.‬

‭●‬ K
‭ ISS (Keep It Simple, Stupid)‬‭: Strive for simplicity‬‭in design, avoiding unnecessary‬
‭complexity, encouraging straightforward solutions, reducing bugs, and improving‬
‭maintainability.‬

‭Object-Oriented Metrics:‬
‭Metrics measure various aspects of an object-oriented system:‬
‭1.‬ ‭Coupling‬‭: Degree of interdependence between modules;‬‭lower coupling is desirable for‬
‭independence.‬
‭2.‬ ‭Cohesion‬‭: Degree to which elements within a module‬‭belong together; higher cohesion‬
‭indicates a well-defined purpose.‬
‭3.‬ ‭Depth of Inheritance Tree (DIT)‬‭: Measures inheritance‬‭levels; deeper trees indicate‬
‭more complexity and reuse potential.‬
‭4.‬ N ‭ umber of Children (NOC)‬‭: Counts immediate subclasses; a higher number indicates a‬
‭well-used base class but may suggest over-generalization.‬
‭5.‬ ‭Weighted Methods per Class (WMC)‬‭: Measures class complexity‬‭based on the‬
‭number and complexity of its methods; higher WMC suggests more functionality but‬
‭may indicate a class doing too much.‬

You might also like