FAQ on Software Engineering (Unit 3)
Multiple Choice Questions (MCQ)
1) Which design identifies the software as a system with
many components interacting with each other?
a) Architectural Design
b) High-level Design
c) Detailed Design
d) Both (1) and (2)
- The statement "Designing is not Coding and Coding is not Designing" is a fundamental principle in software engineering that highlights the distinct and sequential nature of these two activities.
- They are separate phases in the software development lifecycle, each requiring a different skill set and mindset.
Designing: The Blueprint Phase 🗺️
- Designing is a high-level, abstract process. It involves the intellectual work of creating a plan or blueprint for the software.
- This phase happens before any code is written and it focuses on the overall structure and architecture of the system.
- Designers analyze the requirements, user needs, and business goals to determine the best way to solve a problem. They decide on the system's architecture, its major components, and how they will interact.
- Design involves making high-level decisions without getting bogged down in the implementation details. It's about thinking in terms of modules, interfaces, and data flow, not specific lines of code.
- Coding, also known as implementation, is the low-level, concrete process of translating the design specifications into executable source code.
- Coding follows designing and it focuses on the detailed mechanics of building the software.
- Coders take the design documents and write the actual code in a specific programming language. They focus on the syntax, algorithms, data structures, and the logic required to make the system function as designed.
Abstraction:
- Abstraction is the process of hiding complex details and showing only the essential features.
- In software design, it allows developers to focus on the high-level design without getting bogged down in implementation details.
- For example, when you use a "Car" object, you can "drive" it without needing to know the complex internal mechanics of the engine.
- Design patterns are reusable solutions to common problems in software design.
- They are not a finished design that can be directly transformed into code but are templates or descriptions for solving a problem that can be adapted to specific situations.
- For example, the Singleton pattern ensures that a class has only one instance.
- Modularity is the concept of dividing a system into discrete, self-contained components called modules.
- Each module can be developed and tested independently before being integrated into the larger system.
- This makes the system easier to understand, develop, and maintain.
- For example, a web application might have separate modules for user authentication, product catalog, and payment processing.
Express in detail the data model and object model of software engineering.
Data Model:- The data model describes the data structures that will be used by the software.
- It focuses on the data itself, independent of the processes that use it.
- It defines the relationships between different data elements.
- A common example is an Entity-Relationship (ER) diagram, which visually represents entities (e.g., a "Customer" or "Product") and their relationships.
- The object model views the software as a collection of interacting objects.
- An object encapsulates both data (attributes) and behavior (methods) into a single unit.
- This model is central to object-oriented programming.
- A key concept is encapsulation, where data and methods are bundled together, and information is hidden from external access.
- The object model describes the relationships between these objects, such as inheritance and aggregation.
Paraphrase the importance of software design. Express the meaning of coupling and cohesion in software design.
- Software design is the process of defining the architecture, components, and interfaces of a software system to satisfy specified requirements.
- Its importance lies in creating a blueprint for the system before coding begins, which helps in managing complexity, reducing errors, and ensuring the final product is reliable and maintainable.
- A good design leads to a robust, scalable, and efficient system.
- Coupling refers to the degree of interdependence between software modules.
- Loose coupling is desirable, meaning modules are largely independent and a change in one module has minimal impact on others.
- Tight coupling is undesirable, as it makes the system fragile and difficult to maintain.
- Cohesion refers to the degree to which the elements within a module belong together.
- High cohesion is desirable, meaning the module performs a single, well-defined function.
- Low cohesion is undesirable, as the module performs multiple unrelated functions, making it difficult to understand and maintain.
Summarize any four design concepts involved in designing a software with appropriate examples.
Abstraction:
- Abstraction is a concept in software design that tries to hide the complexity and reveal only essential features.
- Example: A
Fileobject in a programming language hides the low-level details of how a file is stored on a disk, allowing a programmer to simply open, read, and write to it.
- Modularity is a design concept that allows the entire problem or software to be breaken down into smaller, independent modules.
- Example: In a banking application, the module for managing customer accounts is separate from the module for handling transactions.
- Information hiding is a principle in system design that ensures the internal details of a to be hidden and inaccessible to other modules.
- Example: A
Stackdata structure can be implemented using an array or a linked list, but the user of theStackmodule doesn't need to know which implementation is used. They only interact withpush()andpop()methods.
- Refinement is a process of taking a high-level design and progressively adding more detail.
- Example: Starting with a top-level design for a "user interface," you refine it by adding details about specific components like "buttons," "text fields," and "menus."
Express your idea on design patterns. How can patterns be used in software design?
- Design patterns are documented, time-tested solutions to recurring problems in software design.
- They are not specific algorithms but rather general templates that can be adapted to different situations.
- They are considered as a form of "best practices" or "common language" that experienced developers use to solve problems.
Patterns can be used in software design in several ways:
Reusability: They provide proven solutions that can be applied repeatedly, saving time and effort.
Communication: They provide a common vocabulary for developers to discuss design issues. For example, saying "we should use a Factory pattern here" conveys a lot of information about the intended design.
Improved Maintainability: By using well-understood patterns, the resulting code is easier for other developers to read, understand, and maintain.
Flexibility and Extensibility: Patterns often promote a more flexible and extensible design, making it easier to add new features or modify existing ones without major changes to the system's architecture.
Define software architecture. What are the key characteristics of good architecture?
- Software architecture is the fundamental organization of a software system.
- It defines the system's components, their external properties, and the relationships among them.
- It is the blueprint that guides the entire development process.
Key characteristics of a good software architecture include:
Modularity: The system is divided into independent, manageable modules.
Scalability: The architecture can handle increased load and growth.
Maintainability: The system is easy to modify and update.
Reusability: Components can be reused in different parts of the system or in other projects.
Flexibility: The system can be easily adapted to new requirements.
Differentiate between monolithic and microservices architecture.
| Feature | Monolithic Architecture | Microservices Architecture |
| Structure | A single, unified application. | A collection of small, independent services. |
| Deployment | The entire application must be deployed together. | Each service can be deployed independently. |
| Development | All components are developed within a single codebase. | Services are developed by small teams, often using different technologies. |
| Scalability | Scaled as a single unit (vertical scaling). | Each service can be scaled independently based on demand. |
| Failure | A failure in one part of the application can affect the entire system. | A failure in one service is isolated and does not affect the others. |
Question 9:
Define software reusability. Explain its advantages and challenges.
- Software reusability is the practice of using existing software components (such as code, modules, or designs) to build new applications.
- It is a fundamental principle of software engineering aimed at reducing development time and effort.
Advantages:
- Faster Development: Reusing components saves time by not having to write new code from scratch.
- Increased Quality: Reused components have been tested and are often more reliable and stable.
- Reduced Cost: Saves on development and testing costs.
Challenges:
Finding Reusable Components: It can be difficult to find a component that fits the new project's specific needs.
Integration Issues: Integrating a reused component into a new system can be complex.
Lack of Documentation: Reused components may lack proper documentation, making them difficult to understand and use.
Question 10:
Express your view on Component-Based Software Engineering.
- Component-Based Software Engineering (CBSE) is a development paradigm that focuses on creating software systems by integrating pre-existing, independently developed components.
- It is a highly effective approach that promotes efficiency and quality.
- By building systems from modular, reusable parts, CBSE allows for faster development cycles and greater reliability.
- The key strength of CBSE is its ability to create a system from "off-the-shelf" components, much like building a house from prefabricated parts.
- This approach, when implemented correctly with well-defined interfaces and robust components, can significantly reduce complexity and maintenance effort.
- However, its success is dependent on the availability of a wide range of high-quality components and a robust framework for their integration.
