FAQ on Software Engineering
Question 1
Define Software Engineering. Identify some of the characteristics of software.
- Software engineering is a systematic, disciplined, and quantifiable approach to the development, operation, and maintenance of software.
- It's an engineering discipline that applies engineering principles to the creation of software.
Some characteristics of software include:
Intangible: Software is a logical entity, not a physical one. You can't touch or feel it.
Doesn't wear out: Unlike hardware, software doesn't degrade over time due to environmental factors or usage. However, it can become obsolete.
Complex: Modern software systems are incredibly complex, often involving millions of lines of code and intricate interactions between different components.
Requires maintenance: Software needs to be updated, fixed, and adapted to new environments and requirements over its lifespan.
Question 2
Outline the four layers of the layered approach in Software Engineering.
The four layers of the layered approach in software engineering, often visualized as a pyramid, are:
Quality Focus:- This is the base of the pyramid consisting four layers of software engineering.
- This is the foundational layer.
- It represents the commitment to quality that underpins all software engineering activities.
- This includes quality assurance, testing, and a focus on producing a product that is reliable and meets user expectations.
- This layer is built upon the quality focus.
- It defines the framework or roadmap for how software is developed.
- A software process includes the steps, tasks, and activities required to create and deliver a software product, such as requirements analysis, design, coding, and deployment.
- This layer sits on top of the process.
- Methods provide the "how-to" for the process.
- They are the specific techniques and approaches used to accomplish software engineering tasks.
- Examples include object-oriented design, structured analysis, and various testing methodologies.
- This is the top, outermost layer.
- Tools are the automated or semi-automated systems and software that support the methods and the overall process.
- They help to automate tasks, manage complexity, and improve efficiency.
- Examples include code editors, compilers, version control systems, and project management software.
Question 3
List and explain the activities defined in the software process framework.
The software process framework defines the fundamental activities common to all software processes. These activities are:
Communication: This is the first step and involves understanding the project requirements and goals. It establishes a collaborative relationship between the client and the developer.
Planning: This activity establishes a plan for the entire project. It includes estimating resources, timelines, and costs, as well as defining project risks and management strategies.
Modeling: This involves creating models or representations of the software. It includes two major steps: requirements analysis (understanding what the software needs to do) and design (how the software will be built).
Construction: This is the core technical activity. It involves coding the software and then testing it to ensure it meets the requirements.
Deployment: This involves delivering the software to the customer, getting their feedback, and making any necessary adjustments or maintenance.
Question 4
Comment on the Incremental Model of software development. Express its advantages and disadvantages.
The Incremental Model is a software development life cycle model where the software is developed in small, manageable increments. Each increment delivers a portion of the complete functionality, and the final product is built by combining all the increments.
Advantages:
Rapid delivery of a working system: The customer gets to use a working version of the software early in the process.
Less risk: The risk of project failure is lower because each increment is a smaller, more manageable project.
Customer feedback is incorporated: Changes requested by the customer can be implemented in later increments.
Disadvantages:
Requires careful planning: The system's overall architecture must be well-defined from the start to ensure all increments can be integrated seamlessly.
Risk of losing architectural coherence: If not managed properly, the system can become fragmented and difficult to maintain.
Question 5
a) Paint the role of Requirements Engineering in the process of Software Engineering.
- Requirements engineering is a crucial part of software development that focuses on discovering, analyzing, documenting, and managing the requirements for a software system.
- Its role is to bridge the gap between the customer's needs and the technical specifications of the software.
- It ensures that the software being built actually solves the problem the customer wants to be solved.
Question 6
Paraphrase user requirements and system requirements.
User Requirements:
- These are high-level, abstract statements of the software's functionality and constraints.
- They're written for customers and end-users in natural language and are designed to be easily understood by non-technical people.
- Example for user requirements: "The system shall allow a user to book a flight."
System Requirements:
- These are detailed, precise specifications of the system's functions, services, and operational constraints.
- They are written for software developers and designers and are a detailed breakdown of the user requirements.
- Here is an example for system requirements, "The system shall validate the user's credit card number against the Luhn algorithm before processing the payment."
Question 7
Journalize the structure of a Software Requirements Document.
A Software Requirements Document (SRD), also known as a Software Requirements Specification (SRS), is a formal document that provides a complete description of the software to be developed. A typical structure includes:
Introduction: Provides an overview of the document, the purpose of the software, and the scope of the project.
General Description: Describes the software's general functions, user characteristics, and assumptions and dependencies.
Specific Requirements: This is the core of the document, detailing all functional and non-functional requirements. It may be broken down into sections for:
Functional Requirements (what the software must do)
Non-functional Requirements (performance, security, usability, etc.)
System Constraints
Appendices: Includes supplementary information like a glossary of terms or data flow diagrams.
Question 8
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.
Question 9
Interpret the following design concepts: Abstraction, Patterns, and Modularity.
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.
Question 10
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.
Question 11
Summarize any four design concepts involved in designing a software with appropriate examples.
Abstraction: Hiding complexity to reveal only essential features.
Example: A
File
object 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: Breaking down a system 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: The principle that a module's internal details should be inaccessible to other modules.
Example: A
Stack
data structure can be implemented using an array or a linked list, but the user of theStack
module doesn't need to know which implementation is used. They only interact withpush()
andpop()
methods.
Refinement: The 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."
Question 12
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.