SE Course Outline covered by Grok
SE Course Outline covered by Grok
The first topic in the Software Engineering course introduces the Nature of Software, which lays the
foundation for understanding what software is, its characteristics, and why it requires a disciplined
engineering approach. Software is a critical component of modern systems, and its unique properties
distinguish it from other engineering artifacts like bridges or cars. Below, I’ll explain the nature of
software in detail, including its definitions, characteristics, types, and challenges, supplemented with
examples.
What is Software?
Software is a set of instructions (programs) that, when executed, provides desired features, functions,
and performance. It includes not just the executable code but also associated data and documentation
that make it operational and maintainable. According to Ian Sommerville in Software Engineering (10th
Edition), software is "more than just a program code; it includes all the documentation and configuration
data needed to make it work correctly."
Software can be thought of as:
• Instructions (Code): The logic that directs hardware to perform tasks.
• Data Structures: Enable efficient management and manipulation of information.
• Documentation: Guides users and developers on how to use and maintain the software.
Example: Consider Microsoft Word. The software includes the executable program (code), data
structures to manage text and formatting, and user manuals or help files (documentation).
Characteristics of Software
Software differs from physical products due to its intangible and malleable nature. Sommerville identifies
several key characteristics:
1. Software is Developed or Engineered, Not Manufactured:
o Unlike hardware, software isn’t "built" on an assembly line. It’s crafted through
intellectual effort, design, and coding.
o Example: Writing a mobile app like a calculator involves designing algorithms and coding
them, not physically assembling parts.
2. Software Doesn’t Wear Out:
o Hardware degrades over time due to physical wear, but software doesn’t. However, it
can become obsolete or "decay" due to changing requirements or bugs.
o Example: An old version of Windows (e.g., XP) still "works" technically but is outdated
due to security vulnerabilities and lack of updates.
3. Software is Custom-Built:
o Most software is tailored to specific needs rather than mass-produced as standard
components.
o Example: A payroll system designed for a specific company includes unique features like
tax rules or employee benefits specific to that organization.
4. Complexity:
o Software can be incredibly intricate, with millions of lines of code interacting in
unpredictable ways.
o Example: The Linux kernel has over 20 million lines of code, managing everything from
file systems to network protocols.
5. Flexibility and Changeability:
o Software can be modified easily compared to hardware, but frequent changes can
introduce errors.
o Example: Adding a new feature to an e-commerce website (e.g., a discount calculator) is
possible but might break existing payment logic if not tested properly.
Types of Software
Software can be categorized based on its purpose and usage. Sommerville and Ghezzi et al.
(Fundamentals of Software Engineering) outline several types:
1. System Software:
o Manages hardware and provides a platform for other software (e.g., operating systems).
o Example: Windows 11 or Red Hat Enterprise Linux manages hardware resources like CPU
and memory.
2. Application Software:
o Solves specific user problems or performs tasks.
o Example: A student grade management system built for a university.
3. Embedded Software:
o Controls devices and is embedded within hardware.
o Example: Firmware in a smart thermostat that adjusts temperature based on sensor
data.
4. Web and Mobile Applications:
o Software accessed via browsers or mobile devices.
o Example: Google Chrome or a weather app on your phone.
5. Artificial Intelligence Software:
o Incorporates machine learning or reasoning.
o Example: A chatbot like me (Grok) built by xAI to assist users.
Key Takeaways
• Software is an intangible, engineered product that’s complex and adaptable.
• Its unique nature (no wear-out, custom-built, invisible) drives the need for software engineering
practices.
• Examples like operating systems, apps, and embedded firmware illustrate its diversity and
challenges.
Key Takeaways
• Software engineering is a disciplined approach to creating and maintaining software.
• It addresses the challenges of complexity, quality, and change through structured processes.
• Examples like ride-sharing apps, student portals, and library systems show its real-world
relevance.
Importance of Professionalism
Professional software development ensures:
• Reliability: Software works as expected (e.g., an ATM doesn’t lose money).
• User Satisfaction: Meets real-world needs (e.g., a navigation app gives accurate routes).
• Economic Viability: Balances cost, time, and quality (e.g., delivering a product within budget).
Real-World Example: The 737 MAX aircraft crashes (2018-2019) were partly due to software flaws and
poor engineering practices, costing Boeing billions and highlighting the stakes of professionalism.
Key Takeaways
• Professional software development applies engineering principles in a structured, team-based
environment.
• It tackles challenges like deadlines, quality, and scalability with tools and processes.
• Examples like banking apps, e-commerce platforms, and attendance systems show its practical
impact.
Key Takeaways
• Software engineering practice is the practical execution of engineering principles.
• It involves understanding problems, planning, coding, testing, and managing change.
• Examples like feedback systems, online stores, and weather apps show how practices lead to
success.
Real-World Example
The development of Google Chrome followed an iterative process structure:
• Initial specification: A fast, secure browser.
• Development: Released basic versions with core features.
• Validation: Tested across platforms.
• Evolution: Added extensions and sync features over time.
Contrast this with a failed project like the UK’s NHS IT system (abandoned in 2011, costing £10 billion),
where a rigid linear structure couldn’t handle changing needs.
Key Takeaways
• Software process structure organizes development into manageable activities.
• It includes specification, development, validation, and evolution, tailored by the chosen model.
• Examples like event systems and browsers show how structure ensures success.
Real-World Example
• Success: NASA’s early space missions (e.g., Apollo) used Waterfall-like processes for software
controlling hardware—requirements were fixed, and documentation was critical.
• Failure: The UK’s NHS Connecting for Health project (2000s) aimed for a national IT system but
collapsed partly due to Waterfall’s inability to handle shifting healthcare needs.
Key Takeaways
• The Waterfall Model is a linear, plan-driven approach with distinct phases.
• It excels with stable requirements and documentation needs but struggles with change.
• Examples like grade systems and thermostats show its practical use and limitations.
Real-World Example
• Microsoft Windows: Early versions (e.g., Windows 1.0) delivered basic features (GUI, file
management), with increments adding multitasking, networking, etc.
• Contrast with Waterfall Failure: The FBI’s Virtual Case File system (2000s) used a rigid Waterfall
approach and failed ($170 million lost), while an incremental approach might have salvaged it
with early usable parts.
Key Takeaways
• The Incremental Model builds software in small, testable, deliverable chunks.
• It offers flexibility and early feedback but requires careful planning.
• Examples like event apps and Windows show its practical value.
Types of Prototyping
1. Throwaway (Rapid) Prototyping:
o Built quickly to clarify requirements, then discarded.
o Tools: Mockup tools (e.g., Figma), paper sketches.
o Example: A paper sketch of a shopping app’s checkout screen to test layout ideas.
2. Evolutionary Prototyping:
o The prototype evolves into the final system through continuous refinement.
o Example: Start with a basic “to-do list” app, then add reminders and sharing features
over iterations.
3. Incremental Prototyping:
o Separate prototypes for different parts are built and later integrated.
o Example: Prototype a “login” feature separately from a “profile” feature, then combine
them.
Real-World Example
• Success: Adobe Photoshop started with prototypes to test image editing tools, evolving based
on user input into a polished product.
• Contrast: The Waterfall-built Healthcare.gov (2013) lacked prototyping, leading to a buggy
launch—early prototypes could’ve caught issues.
Key Takeaways
• The Prototyping Model builds early versions to refine requirements and design.
• It excels with unclear needs and user involvement but risks scope creep.
• Examples like parking apps and Photoshop highlight its practical use.
Real-World Example
• Success: The U.S. Department of Defense used the Spiral Model for military software (e.g.,
missile systems), managing risks like hardware failures and security threats.
• Contrast: The Waterfall-based London Ambulance System (1992) failed due to unaddressed risks
(e.g., system overload), costing lives—Spiral’s risk focus might have helped.
Key Takeaways
• The Spiral Model iterates through cycles, emphasizing risk management.
• It’s flexible and robust for complex, risky projects but costly and complex.
• Examples like security apps and military systems show its value.
Real-World Example
• Success: Early versions of Microsoft Access used RAD-like principles, leveraging pre-built
database components to deliver a usable tool fast.
• Contrast: The Waterfall-based FBI Virtual Case File (2000s) took years and failed—RAD could’ve
delivered functional pieces sooner.
Key Takeaways
• The RAD Model prioritizes rapid development through prototyping and tools.
• It’s fast and flexible but limited to smaller, less risky projects.
• Examples like survey apps and Access show its practical strengths.
Real-World Example
• Success: Spotify uses Agile (Scrum with “Squads”) to roll out features like “Discover Weekly”
iteratively, adapting to user habits.
• Contrast: Waterfall’s rigidity sank the UK NHS IT project (2000s)—Agile’s flexibility might have
delivered usable parts sooner.
Key Takeaways
• Agile process models (e.g., Scrum, XP, Kanban) prioritize speed, flexibility, and collaboration.
• They excel in dynamic settings but require discipline and user input.
• Examples like event apps and Spotify show their real-world impact.
Real-World Example
• Success: Netflix uses CI/CD and TDD to deploy updates daily, ensuring a seamless streaming
experience.
• Contrast: Waterfall’s rigid planning delayed the UK’s NHS IT system—Agile techniques could’ve
delivered working parts faster.
Key Takeaways
• Agile development techniques (e.g., TDD, CI, pair programming) enable rapid, quality-focused
development.
• They boost collaboration and adaptability but require skill and discipline.
• Examples like parking apps and Netflix highlight their impact.
2. Flexibility
• Waterfall: Rigid; changes are difficult once a phase is complete.
o Weakness: Can’t add “dark mode” mid-project easily.
• Incremental: Moderately flexible; later increments can adjust.
o Strength: Add “RSVP” to an event app after initial release.
• Prototyping: Highly flexible; evolves based on feedback.
o Strength: Adjust a timetable app’s layout mid-process.
• Spiral: Flexible within spirals; adapts to risks and feedback.
o Strength: Add encryption to a security app after risk assessment.
• RAD: Very flexible; rapid iterations accommodate changes.
o Strength: Tweak a feedback app based on early trials.
• Agile: Most flexible; embraces change at any stage.
o Strength: Add “notifications” to a chat app mid-sprint.
3. Risk Management
• Waterfall: Poor; risks surface late (e.g., in testing).
o Weakness: Bug found after deployment is costly.
• Incremental: Moderate; risks are spread across increments.
o Strength: Fix a grade entry bug before adding reports.
• Prototyping: Moderate; early prototypes reduce requirement risks.
o Strength: Catch UI issues before coding.
• Spiral: Excellent; explicit risk analysis per cycle.
o Strength: Test server load for an e-commerce app early.
• RAD: Low; speed trumps risk focus.
o Weakness: Might miss scalability issues in a rushed app.
• Agile: Good; frequent testing and feedback mitigate risks.
o Strength: Fix a login flaw in a sprint review.
4. Delivery Speed
• Waterfall: Slow; delivers only at the end.
o Weakness: Users wait months for a full system.
• Incremental: Moderate; delivers usable parts incrementally.
o Strength: Release “view grades” before “register courses.”
• Prototyping: Moderate; early prototypes, final system later.
o Strength: Demo a basic app quickly.
• Spiral: Slow to moderate; risk analysis delays delivery.
o Weakness: Thoroughness slows initial release.
• RAD: Fast; prioritizes rapid deployment.
o Strength: Deliver a survey app in weeks.
• Agile: Fast; frequent releases (e.g., every 2 weeks).
o Strength: Launch “play music” in a sprint.
5. User Involvement
• Waterfall: Low; users see the product at the end.
o Weakness: Misaligned needs (e.g., missing features).
• Incremental: Moderate; feedback after each increment.
o Strength: Adjust a portal after initial use.
• Prototyping: High; users shape the system via prototypes.
o Strength: Refine a parking app based on trials.
• Spiral: Moderate; feedback per spiral, but less frequent.
o Strength: Users test security features early.
• RAD: High; constant user input drives rapid iterations.
o Strength: Faculty guide a feedback app’s design.
• Agile: Very high; continuous collaboration.
o Strength: Students steer a game app’s features.
6. Documentation
• Waterfall: Heavy; detailed docs at every phase.
o Strength: Great for regulated systems.
• Incremental: Moderate; docs per increment.
o Strength: Balances detail and progress.
• Prototyping: Low; focus on prototypes, not docs.
o Weakness: Hard to maintain later.
• Spiral: Moderate to high; includes risk reports.
o Strength: Useful for complex projects.
• RAD: Low; minimal docs for speed.
o Weakness: Future updates may suffer.
• Agile: Low; prioritizes working software.
o Weakness: New devs might struggle.
Summary Table
Model Flexibility Risk Mgmt Speed User Involvement Documentation Best For
Waterfall Low Poor Slow Low High Stable projects
Incremental Moderate Moderate Moderate Moderate Moderate Phased delivery
Prototyping High Moderate Moderate High Low Unclear needs
Spiral High Excellent Slow Moderate Moderate-High High-risk projects
RAD Very High Low Fast High Low Quick, small projects
Agile Very High Good Fast Very High Low Dynamic, user-focused
Real-World Example
• Success: The Apollo 11 moon landing (1969) used meticulous project management to coordinate
software and hardware, meeting a tight deadline.
• Failure: The 2013 Healthcare.gov launch failed due to poor management (no clear oversight,
missed deadlines), costing millions to fix.
Key Takeaways
• Project management organizes software development to meet goals within constraints.
• It involves planning, scheduling, resource allocation, and risk management.
• Examples like event apps and Apollo show its critical role.
Types of Requirements
Requirements are broadly categorized into two types, with subcategories:
1. Functional Requirements:
o Specify what the system should do (features, behaviors).
o Examples:
▪ “The app shall allow users to log in with a username and password.”
▪ “The system shall calculate fines for overdue books.”
o For BSIT: “A quiz app shall display 10 questions and score answers.”
2. Non-Functional Requirements:
o Define how the system should perform (quality attributes, constraints).
oSubtypes:
▪ Performance: “The system shall handle 1,000 users simultaneously.”
▪ Usability: “The UI shall be intuitive for first-time users.”
▪ Security: “Data shall be encrypted during transmission.”
▪ Reliability: “The system shall have 99.9% uptime.”
o Example: “A student portal shall load grades in under 3 seconds and protect user data.”
3. Domain Requirements (Optional):
o Specific to the application area.
o Example: “A medical app shall comply with HIPAA regulations.”
Real-World Example
• Success: Google Maps’ requirements (e.g., “provide real-time directions”) were well-defined,
leading to a reliable product.
• Failure: The 2013 Healthcare.gov launch suffered from unclear requirements (e.g., untested
scalability), causing crashes.
Key Takeaways
• Requirements engineering defines what a system should do and how it should perform.
• It involves elicitation, analysis, specification, validation, and management.
• Examples like event apps and Maps show its role in success.
Key Differences
Aspect Functional Requirements Non-Functional Requirements
Focus What the system does How the system performs
Examples “Calculate GPA” “System must handle 1,000 users”
Testability Direct (does it work?) Indirect (how well does it work?)
Aspect Functional Requirements Non-Functional Requirements
Scope Specific features Overall quality and constraints
Impact of Failure Feature doesn’t work System works but poorly (e.g., slow)
Example: If a library app doesn’t “track borrowed books” (FR fails), the feature is broken. If it tracks
books but takes 10 seconds (NFR fails), it’s usable but frustrating.
Challenges
• Ambiguity: “Make it fast” (NFR) vs. “Load in under 2 seconds.”
• Trade-offs: High security (NFR) might slow performance (NFR).
• Elicitation: Users focus on FRs, overlooking NFRs like scalability.
• Validation: NFRs are harder to test (e.g., “intuitive” vs. “logs in”).
Example: A vague “secure app” becomes “encrypt data with AES-256” after clarification.
Real-World Example
• Success: Netflix’s FRs (e.g., “stream videos”) pair with NFRs (e.g., “buffer in under 1 second”),
ensuring a smooth experience.
• Failure: The 1999 Mars Climate Orbiter crashed due to an unmet NFR (unit consistency), costing
$327 million.
Key Takeaways
• Functional requirements define what the system does (e.g., features).
• Non-functional requirements specify how well it performs (e.g., speed, security).
• Examples like event apps and Netflix show their combined importance.
Real-World Example
• Success: Amazon’s order system context model includes “Customer,” “Warehouse,” and
“Payment Gateway,” ensuring clear boundaries for a scalable design.
• Failure: The London Ambulance System (1992) lacked a clear context model, missing key entities
like “dispatchers,” leading to failure.
Key Takeaways
• Context models define a system’s boundaries and external interactions.
• They use simple diagrams to show the system, entities, and flows.
• Examples like parking apps and Amazon illustrate their role in analysis.
Real-World Example
• Success: PayPal’s payment flow uses interaction models to ensure “user pays” triggers “bank
debits” correctly.
• Failure: The 1992 London Ambulance System lacked interaction models, missing critical dispatch
flows, leading to delays.
Key Takeaways
• Interaction models (sequence and collaboration diagrams) detail system behavior.
• They show sequences or relationships between actors and components.
• Examples like event apps and PayPal highlight their role in analysis.
Real-World Example
• Success: Amazon’s order system uses structural models (e.g., “Order,” “Customer,” “Payment”)
to ensure scalable design.
• Failure: The 2000s FBI Virtual Case File lacked clear structure, leading to integration issues and
abandonment.
Key Takeaways
• Structural models (class and object diagrams) show a system’s static organization.
• They define components, attributes, and relationships.
• Examples like event apps and Amazon highlight their role in analysis.
Real-World Example
• Success: ATM systems use behavioral models to ensure “Insert Card → Enter PIN → Withdraw”
flows correctly.
• Failure: The 1996 Ariane 5 crash ignored behavioral modeling, missing a state mismatch in
reused software.
Key Takeaways
• Behavioral models (state and activity diagrams) capture dynamic system behavior.
• They show states/transitions or activity flows for specific scenarios.
• Examples like event apps and ATMs highlight their analysis role.
Comparison of Analysis Models: Context, Interaction, Structural, and Behavioral Models
Before moving to the next topic, let’s compare the four analysis models covered so far: Context Models,
Interaction Models, Structural Models, and Behavioral Models. These models serve distinct yet
complementary purposes in understanding and specifying a software system during the analysis phase.
Below, I’ll provide a detailed comparison based on their focus, representation, purpose, complexity, and
use cases, tailored for BSIT students.
1. Focus
• Context Models:
o Focus: The system’s boundaries and external environment.
o What it Shows: How the system interacts with external entities (e.g., users, other
systems).
o Example: A library app interacts with “Student,” “Librarian,” and “Database.”
o Scope: High-level, external perspective; no internal details.
• Interaction Models:
o Focus: Dynamic interactions between the system and actors or components.
o What it Shows: The sequence or communication of actions (e.g., “Student searches,
system responds”).
o Example: A sequence diagram for “Borrow a Book” shows steps between “Student” and
“Library System.”
o Scope: Specific scenarios, moderate detail.
• Structural Models:
o Focus: Static organization of the system’s components.
o What it Shows: Classes or objects and their relationships (e.g., “User borrows Book”).
o Example: A class diagram links “Student,” “Event,” and “Registration.”
o Scope: System-wide structure, internal perspective.
• Behavioral Models:
o Focus: Dynamic behavior and state changes over time.
o What it Shows: How the system responds to events (e.g., states like “Available” to
“Borrowed”).
o Example: A state diagram for a book shows transitions like “borrow” and “return.”
o Scope: Specific behaviors or workflows, internal dynamics.
3. Purpose
• Context Models:
o Purpose: Define scope and external interfaces.
o Why Use It: To agree on what’s in/out of the system.
o Example: Ensures a parking app focuses on “Students” and “Sensors,” not “Car
Maintenance.”
• Interaction Models:
o Purpose: Detail how interactions occur for specific use cases.
o Why Use It: To validate dynamic requirements and guide coding flows.
o Example: Confirms “RSVP” triggers “confirmation” in an event app.
• Structural Models:
o Purpose: Organize the system’s components and relationships.
o Why Use It: To provide a static blueprint for design and implementation.
o Example: Links “Student” and “Course” for a portal’s database design.
• Behavioral Models:
o Purpose: Capture how the system behaves dynamically.
o Why Use It: To ensure correct responses to events and workflows.
o Example: Ensures a game’s “Player” moves from “Alive” to “Dead” on “hit.”
Summary Table
Model Focus Diagram Purpose Complexity Best For
External
Context Context Diagram Define scope Low Scoping
boundaries
Dynamic Use case
Interaction Sequence/Collaboration Detail flows Moderate
interactions behavior
Static Organize Moderate-
Structural Class/Object Design blueprint
organization components High
Dynamic Moderate-
Behavioral State/Activity Model responses Workflow/logic
behavior High
Real-World Example
• Success: Automotive systems use MDE (e.g., Simulink) to model and generate control software.
• Contrast: Traditional coding delayed the FBI’s Virtual Case File—MDE might have streamlined it.
Key Takeaways
• MDE uses models as the core, automating code generation.
• It enhances efficiency but requires tool mastery.
• Examples like parking apps show its potential.
Let me know if you’d like more details or if we should move to the next topic: Data Modeling!
Real-World Example
• Success: Amazon’s data model links “Customer,” “Order,” and “Product” for efficient e-
commerce.
• Failure: The 2000s NHS IT system lacked a clear data model, causing data integration issues.
Key Takeaways
• Data modeling structures entities, attributes, and relationships.
• It progresses from conceptual to physical levels.
• Examples like event apps and Amazon show its design role.
Real-World Example
• Success: PayPal’s payment system uses functional modeling to map “Enter Amount → Verify
Card → Transfer Funds.”
• Failure: The 1992 London Ambulance System skipped functional modeling, missing key dispatch
processes.
Key Takeaways
• Functional modeling (e.g., DFDs) details system processes and data flows.
• It supports requirements validation and design.
• Examples like event apps and PayPal show its practical role.
Real-World Example
• Success: Netflix’s data design links “User,” “Movie,” and “Watch History” for fast streaming
recommendations.
• Failure: The 2000s NHS IT system had poor data design, causing data mismatches.
Key Takeaways
• Data design transforms data models into optimized structures.
• It uses tables, keys, and constraints for efficiency and integrity.
• Examples like event apps and Netflix show its critical role.
Real-World Example
• Success: Netflix uses a microservices architecture (e.g., “Streaming,” “Recommendation”) for
scalability and resilience.
• Failure: The 1990s Denver Airport baggage system had a poor architecture, causing delays and
cost overruns.
Key Takeaways
• Architectural design structures a system into components and interactions.
• It uses patterns like Layered, MVC, or Microservices.
• Examples like event apps and Netflix show its foundational role.
Representation Tools
• Pseudocode: Informal code-like description.
o Example: if book.available then updateLoan(bookID, userID).
• Flowcharts: Visual control flow.
o Example: [Start] → [Check Availability] → [Yes: Borrow] → [End].
• UML Diagrams:
o Class Diagrams: Show component structure with methods.
o Sequence Diagrams: Detail interactions within components.
Real-World Example
• Success: Google Maps’ “Route Calculator” component is modular, interfacing with “Map Data”
for efficient navigation.
• Failure: The 1990s Denver Airport baggage system lacked clear component design, causing
integration chaos.
Key Takeaways
• Component-level design details individual modules from the architecture.
• It defines data, algorithms, and interfaces for coding.
• Examples like event apps and Maps show its implementation role.
UI Design Elements
• Input Controls: Buttons, text fields, dropdowns (e.g., “Search” button).
• Navigation: Menus, tabs, breadcrumbs (e.g., “Home > Events”).
• Information Displays: Tables, charts, text (e.g., event list).
• Feedback: Messages, alerts, progress bars (e.g., “RSVP confirmed”).
Example: A library app UI:
• Input: “Search” text field.
• Navigation: “Books | Loans” tabs.
• Display: Table of book titles.
• Feedback: “Book unavailable” popup.
Real-World Example
• Success: Google’s minimalist search UI (one text box, two buttons) is clear and efficient.
• Failure: The 2013 Healthcare.gov UI was cluttered and confusing, frustrating users.
Key Takeaways
• UI design creates the user-facing part of a system.
• It emphasizes clarity, consistency, and usability.
• Examples like event apps and Google show its impact.
Real-World Example
• Success: Amazon uses UML to model “Order” and “Customer” interactions for scalable design.
• Failure: The 1990s Denver Airport baggage system lacked clear UML, causing integration issues.
Key Takeaways
• UML is a visual language for OOAD, modeling structure and behavior.
• Key diagrams include class (structure), use case, and sequence (behavior).
• Examples like event apps and Amazon show its role in design.
Structural Diagrams
These describe the system’s static architecture.
1. Class Diagram:
o Definition: Shows classes, their attributes, operations, and relationships.
o Purpose: Defines the system’s object-oriented structure.
o Components:
▪ Classes: Boxes with name, attributes, operations (e.g., “Book”).
▪ Relationships: Lines for association (e.g., “borrows”), inheritance, aggregation.
▪ Multiplicity: Numbers (e.g., “1..*” for one-to-many).
o Example:
text
CollapseWrapCopy
+----------------+ +----------------+
| Book | | User |
|----------------|1..* 1 |----------------|
| title: String |<------->| name: String |
| ISBN: String |borrows | ID: String |
| getDetails() | | borrowBook() |
+----------------+ +----------------+
• Use: Design database and code classes.
2. Object Diagram:
o Definition: Shows instances of classes at a specific moment.
o Purpose: Illustrates real data scenarios.
o Components: Objects (e.g., “Book1:Book”), links.
o Example:
text
CollapseWrapCopy
[Book1:Book] ----borrows----> [Alice:User]
|title: "CS101" |name: "Alice"
|ISBN: "12345" |ID: "S001"
• Use: Validate class diagram with examples.
Behavioral Diagrams
These describe the system’s dynamic behavior.
3. Use Case Diagram:
o Definition: Shows system functions (use cases) and actors interacting with them.
o Purpose: Captures functional requirements from a user perspective.
o Components:
▪ Actors: Stick figures (e.g., “Student”).
▪ Use Cases: Ovals (e.g., “Borrow Book”).
▪ Associations: Lines connecting actors to use cases.
o Example:
text
CollapseWrapCopy
[Student] ----> [Borrow Book]
| |
| [Search Book]
|
[Librarian] ----> [Add Book]
• Use: Early analysis to define what the system does.
4. Sequence Diagram:
o Definition: Shows time-ordered interactions between objects or actors.
o Purpose: Details how a use case is executed.
o Components:
▪ Lifelines: Vertical dashed lines (e.g., “Student,” “UI”).
▪ Messages: Arrows (e.g., “request book”).
▪ Activation Bars: Thin rectangles (processing time).
o Example:
text
CollapseWrapCopy
[Student] [UI] [Logic] [Database]
| | | |
|---search->| | |
| |---query->| |
| | |---fetch-->|
| | |<--data---|
| |<--results-| |
|<--display-| | |
• Use: Design interaction flows.
5. State Machine Diagram:
o Definition: Shows states of an object and transitions triggered by events.
o Purpose: Models object behavior over time.
o Components:
▪ States: Rounded rectangles (e.g., “Available”).
▪ Transitions: Arrows with events (e.g., “borrow”).
o Example:
text
CollapseWrapCopy
[Available] ---borrow---> [Borrowed]
^ |
| return
| |
+--------<-------------+
• Use: Define object lifecycles.
6. Activity Diagram:
o Definition: Shows the workflow of a process, including decisions.
o Purpose: Models procedural logic or use case steps.
o Components:
▪ Activities: Rounded rectangles (e.g., “Search Book”).
▪ Transitions: Arrows.
▪ Decision Nodes: Diamonds (e.g., “Available?”).
o Example:
text
CollapseWrapCopy
[Start] → [Search Book] → [Available?] → [Yes: Borrow] → [End]
| No |
+----> [End]
• Use: Plan workflows.
Real-World Example
• Success: Netflix uses UML to model “User,” “Stream,” and interactions for a seamless experience.
• Failure: The 1992 London Ambulance System lacked UML clarity, missing critical flows.
Key Takeaways
• UML diagrams model structure (class) and behavior (use case, sequence, etc.).
• They guide OOAD from requirements to implementation.
• Examples like event apps and Netflix show their utility.
Real-World Example
• Success: Amazon’s “Place Order” use case drives a clear checkout process.
• Failure: The 2013 Healthcare.gov lacked use case clarity, leading to usability issues.
Key Takeaways
• Use case modeling captures system functions via diagrams and descriptions.
• It links actors to use cases, detailing interactions.
• Examples like event apps and Amazon show its analysis role.
Real-World Example
• Success: Google Maps’ “Location” and “Route” classes support scalable navigation.
• Failure: The 2000s FBI Virtual Case File lacked clear class models, causing integration issues.
Key Takeaways
• Class-based modeling defines classes, attributes, operations, and relationships.
• It uses UML class diagrams to structure a system.
• Examples like event apps and Maps show its design role.
Real-World Example
• Success: Java’s “InputStream” hierarchy uses inheritance and polymorphism for flexible I/O.
• Failure: Early monolithic systems lacked OOD, making updates hard.
Key Takeaways
• OOD concepts (encapsulation, inheritance, etc.) structure object-oriented systems.
• They enhance design quality and implementation.
• Examples like event apps and Java show their power.
class Student {
private String name;
public void update(String status) {
System.out.println(name + " notified: Event is " + status);
}
}
• Use: Event changes to “canceled,” all students get notified.
• Consequence: Flexible notifications, but adds overhead.
Real-World Example
• Success: Java’s “Iterator” pattern (Behavioral) simplifies list traversal.
• Failure: Early ad-hoc designs (e.g., 1990s baggage systems) lacked patterns, causing chaos.
Key Takeaways
• Pattern-based design applies reusable solutions to design problems.
• It includes creational, structural, and behavioral patterns.
• Examples like event apps and Java show its practical value.
class Library:
def __init__(self):
self.books = {} # Dictionary to store books
self.loans = [] # List to store loans
# Test
library = Library()
library.books["12345"] = Book("12345", "CS101")
result = library.borrowBook("12345", "S001")
print("Borrow successful:", result) # True
• Fidelity: Matches design (checks availability, updates status).
• Modularity: Separate “Book” and “Library” classes.
• Error Handling: Handles unavailable or missing books.
class Student:
def __init__(self, studentID, name):
self.studentID = studentID
self.name = name
# Test
event = Event(1, "Hackathon", 50)
student = Student("S001", "Alice")
result = event.register("S001")
print("RSVP successful:", result) # True
• Setup: Python with simple list-based storage.
• Code: Implements “register()” with capacity check.
• Test: Verifies RSVP works.
Scenario: Add database integration (e.g., SQLite) later—refine to saveRegistration().
Real-World Example
• Success: Google Maps implements “Route Calculation” with modular, tested code.
• Failure: The 1992 London Ambulance System had rushed implementation, missing key
integrations.
Key Takeaways
• Software implementation turns design into executable code.
• It follows principles like modularity and fidelity to design.
• Examples like event apps and Maps show its execution role.
Topic 34: Software Testing Basics
The thirty-fourth topic in the Software Engineering course moves into Software Testing Basics, a critical
phase that ensures the implemented software meets its requirements and functions correctly. This topic
introduces the fundamental concepts, techniques, and processes of testing software systems. Below, I’ll
explain software testing in detail, including its definition, purpose, principles, types, process, and
examples tailored for BSIT students.
class TestLibrary(unittest.TestCase):
def setUp(self):
self.lib = Library()
self.lib.books["12345"] = Book("12345", "CS101")
def test_valid_borrow(self):
result = self.lib.borrowBook("12345", "S001")
self.assertTrue(result)
self.assertFalse(self.lib.books["12345"].available)
def test_unavailable_borrow(self):
self.lib.borrowBook("12345", "S001") # Borrow first
result = self.lib.borrowBook("12345", "S002")
self.assertFalse(result)
def test_invalid_book(self):
result = self.lib.borrowBook("99999", "S001")
self.assertFalse(result)
if __name__ == "__main__":
unittest.main()
• Result: Tests pass if code behaves as expected.
class TestEvent(unittest.TestCase):
def setUp(self):
self.event = Event(1, "Hackathon", 2)
def test_successful_rsvp(self):
result = self.event.register("S001")
self.assertTrue(result)
self.assertEqual(len(self.event.registrations), 1)
def test_event_full(self):
self.event.register("S001")
self.event.register("S002")
result = self.event.register("S003")
self.assertFalse(result)
if __name__ == "__main__":
unittest.main()
Scenario: Bug found—capacity not checked correctly; fix and retest.
Real-World Example
• Success: Google tests Maps’ routing to ensure accuracy and speed.
• Failure: The 2013 Healthcare.gov skipped thorough testing, causing launch failures.
Key Takeaways
• Software testing verifies functionality and finds defects.
• It includes unit, integration, and system levels.
• Examples like event apps and Maps show its critical role.
Real-World Example
• Success: Netflix’s Agile testing catches streaming bugs per sprint.
• Failure: The 1992 London Ambulance System used Big Bang, missing integration flaws.
Key Takeaways
• Testing strategies plan how to test systematically.
• They vary by approach (e.g., V-Model, Agile).
• Examples like event apps and Netflix show their role in quality.
def sendReminder(self):
for studentID in self.registrations:
print(f"Reminder: {self.title} on {self.date} for {studentID}")
• Test: Verify reminders print for registered students.
• Impact: Check “register()” still works (regression test).
• Deploy: Release v1.2 with reminders.
Scenario: OS update breaks UI (Adaptive)—adjust layout and retest.
Real-World Example
• Success: Microsoft Windows updates fix bugs and add features (e.g., Windows 11
enhancements).
• Failure: The 2000s NHS IT system neglected maintenance, leading to obsolescence.
Key Takeaways
• Software maintenance fixes bugs, adapts, and enhances post-deployment.
• It includes corrective, adaptive, perfective, and preventive types.
• Examples like event apps and Windows show its ongoing role.
Quality Attributes
SQA targets these software quality attributes (from ISO/IEC 25010):
• Functionality: Does it work as intended? (e.g., “RSVP Event” registers users).
• Reliability: Can it handle failures? (e.g., no crashes on overload).
• Usability: Is it easy to use? (e.g., intuitive UI).
• Efficiency: Is it fast and resource-light? (e.g., <2s response).
• Maintainability: Is it easy to update? (e.g., modular code).
• Portability: Does it work across platforms? (e.g., Android/iOS).
• Security: Is it safe? (e.g., encrypted data).
Example: A library app’s SQA ensures “Borrow Book” is reliable, usable, and secure.
SQA Activities
SQA involves these key activities:
1. Process Definition:
o Establish standards and methodologies (e.g., Agile with coding guidelines).
2. Reviews and Audits:
o Check requirements, design, code (e.g., peer review of “Event” class).
3. Testing Oversight:
o Ensure testing aligns with quality goals (e.g., verify unit tests cover “Borrow Book”).
4. Metrics Collection:
o Measure quality (e.g., bugs per module, response time).
5. Training:
o Educate team on best practices (e.g., OOD principles).
6. Configuration Management:
o Track changes (e.g., Git commits for “RSVP fix”).
7. Risk Management:
o Identify and mitigate risks (e.g., “database failure”).
Real-World Example
• Success: NASA’s SQA for Mars Rover software ensured zero critical failures.
• Failure: The 2013 Healthcare.gov skipped robust SQA, leading to launch issues.
Key Takeaways
• SQA ensures software meets quality standards proactively.
• It includes reviews, testing oversight, and metrics.
• Examples like event apps and NASA show its quality role.
SCM Tools
• Git: Distributed version control (e.g., GitHub, GitLab).
• Subversion (SVN): Centralized version control.
• Mercurial: Another distributed option.
• Supporting Tools: JIRA (change tracking), Jenkins (build integration).
Example: A library app uses Git to manage “Borrow Book” code versions.
Real-World Example
• Success: Linux kernel uses Git for SCM, managing millions of lines across thousands of
developers.
• Failure: The 2000s FBI Virtual Case File lacked SCM, causing version mismatches.
Key Takeaways
• SCM manages changes to software artifacts systematically.
• It includes version control, change management, and auditing.
• Examples like event apps and Linux show its collaboration role.
Estimation Techniques
Several methods are used, often combined:
1. Expert Judgment:
o Approach: Team members estimate based on experience.
o Example: “Borrow Book took 20 hours last time—similar here.”
o Pros: Quick, leverages expertise.
o Cons: Subjective, depends on memory.
2. Analogous Estimation:
o Approach: Uses historical data from similar projects.
o Example: “Last app took 300 hours for 5 features; this has 6, so ~360 hours.”
o Pros: Simple, data-based.
o Cons: Needs comparable projects.
3. Function Point Analysis (FPA):
o Approach: Measures size by counting inputs, outputs, queries, files, interfaces.
o Example: Library app: 3 inputs (search, borrow, return), 2 outputs (results, confirmation)
→ 20 function points → 200 hours (10 hours/FP).
o Pros: Objective, standardized.
o Cons: Complex, needs training.
4. COCOMO (Constructive Cost Model):
o Approach: Mathematical model based on size (e.g., lines of code), effort multipliers
(e.g., team skill).
o Example: Basic COCOMO: Effort = a * (KLOC)^b * EAF (e.g., 2.4 * 5^1.05 * 1.2 = ~32
person-months).
o Pros: Detailed, scalable.
o Cons: Requires size estimate first.
5. Planning Poker (Agile):
o Approach: Team assigns story points collaboratively.
o Example: “RSVP Event” = 5 points, team velocity = 20 points/sprint → 1 sprint.
o Pros: Team consensus, Agile-friendly.
o Cons: Less precise for cost.
Real-World Example
• Success: NASA’s Mars Rover used COCOMO for precise effort planning.
• Failure: The 2000s NHS IT system underestimated scope, ballooning costs.
Key Takeaways
• Project estimation predicts effort, time, and cost.
• It uses techniques like FPA, COCOMO, and Planning Poker.
• Examples like event apps and NASA show its planning role.
Real-World Example
• Success: Apollo 11’s risk management mitigated software overload, ensuring a moon landing.
• Failure: The 1996 Ariane 5 rocket crashed due to unaddressed reuse risks.
Key Takeaways
• Risk management identifies and mitigates project threats.
• It involves analysis, prioritization, and continuous monitoring.
• Examples like event apps and Apollo show its protective role.
Real-World Example
• Success: Google uses metrics (e.g., latency, crash rate) to optimize Maps.
• Failure: The 1990s Denver Airport baggage system ignored metrics, missing delays.
Key Takeaways
• Metrics measure product, process, and project attributes.
• They support quality and progress tracking.
• Examples like event apps and Google show their analytical role.
Agile Methodologies
Agile includes several frameworks:
1. Scrum:
o Structure: Sprints (2-4 weeks), roles (Product Owner, Scrum Master, Team), events
(Sprint Planning, Daily Scrum, Review, Retrospective).
o Example: Library app sprints: Sprint 1=“Search,” Sprint 2=“Borrow.”
o Pros: Clear roles, time-boxed delivery.
o Cons: Needs discipline.
2. Kanban:
o Structure: Visual board (To Do, In Progress, Done), continuous flow, no fixed iterations.
o Example: Event app tasks move from “Design UI” to “Test UI” as completed.
o Pros: Flexible, real-time tracking.
o Cons: Less structured.
3. Extreme Programming (XP):
o Structure: Pair programming, test-driven development (TDD), frequent releases.
o Example: Student portal uses TDD for “Calculate GPA.”
o Pros: High quality, rapid feedback.
o Cons: Intense for teams.
4. Lean Software Development:
o Structure: Eliminate waste, deliver fast, optimize the whole.
o Example: Game skips unused features to focus on “Shoot.”
o Pros: Efficient, customer-focused.
o Cons: May miss long-term planning.
class EventManager:
def viewEvents(self):
return [event.title for event in self.events]
• Daily Scrum: “Coded view, testing today.”
• Review: “Looks good, add dates”—backlog updated.
• Sprint 2: “RSVP Event.”
Scenario: Mid-sprint, “notifications” requested—prioritized for Sprint 3.
Real-World Example
• Success: Spotify uses Scrum to roll out features like “Discover Weekly” iteratively.
• Contrast: Waterfall delayed the 2000s FBI Virtual Case File with rigid planning.
Key Takeaways
• Agile delivers software iteratively with customer focus.
• It uses frameworks like Scrum, Kanban, and XP.
• Examples like event apps and Spotify show its adaptive role.
Components of Scrum
Scrum is built on three pillars—Transparency, Inspection, Adaptation—and includes:
1. Roles:
o Product Owner (PO):
▪ Defines what to build (e.g., prioritizes “Borrow Book” over “Reserve”).
▪ Manages the Product Backlog.
o Scrum Master (SM):
▪ Facilitates the process, removes impediments (e.g., “fix slow server”).
▪ Coaches the team on Scrum practices.
o Development Team:
▪ Self-organizing group (3-9 people) that builds the software (e.g., coders, testers).
2. Artifacts:
o Product Backlog:
▪ Ordered list of features/user stories (e.g., “As a student, I want to RSVP”).
o Sprint Backlog:
▪ Subset of Product Backlog for the sprint (e.g., “View Events”).
o Increment:
▪ Working software delivered at sprint’s end (e.g., “Search Book” feature).
3. Events:
o Sprint: Fixed time-box (1-4 weeks) for delivering an increment.
o Sprint Planning: Team selects backlog items and plans work (e.g., “8 points this sprint”).
o Daily Scrum: 15-minute stand-up to sync (e.g., “What did I do? What’s next?”).
o Sprint Review: Demo increment, gather feedback (e.g., “Users want filters”).
o Sprint Retrospective: Reflect and improve (e.g., “Test earlier next time”).
Real-World Example
• Success: Atlassian uses Scrum to develop Jira, delivering features every few weeks.
• Contrast: Waterfall delayed the 1990s Denver Airport system with no early feedback.
Key Takeaways
• Scrum is an Agile framework with roles, artifacts, and events.
• It delivers increments in sprints, adapting to change.
• Examples like event apps and Atlassian show its iterative role.
Principles of Kanban
Kanban is guided by four core principles:
1. Start with What You Do Now:
o Build on existing processes, don’t overhaul them.
o Example: Use current coding/testing flow, add Kanban board.
2. Agree to Pursue Incremental Change:
o Improve gradually, not radically.
o Example: Limit WIP first, then optimize later.
3. Respect Current Roles and Responsibilities:
o No new roles (unlike Scrum’s PO/SM).
o Example: Team keeps coding, adds visualization.
4. Encourage Leadership at All Levels:
o Anyone can suggest improvements.
o Example: Tester proposes “faster review cycle.”
Real-World Example
• Success: Microsoft uses Kanban in Azure DevOps for continuous task flow.
• Contrast: Scrum’s fixed sprints delayed a rigid 1990s project.
Key Takeaways
• Kanban visualizes work, limits WIP, and manages flow.
• It’s continuous, flexible, and team-driven.
• Examples like event apps and Microsoft show its workflow role.
Real-World Example
• Success: Toyota’s lean principles inspired Dropbox to streamline features, focusing on core file
sync.
• Contrast: Waterfall’s heavy planning delayed the 1990s NHS IT system.
Key Takeaways
• Lean maximizes value, minimizes waste in software development.
• It uses seven principles like “eliminate waste” and “deliver fast.”
• Examples like event apps and Dropbox show its efficiency role.
What is DevOps?
DevOps is a set of practices, tools, and a cultural philosophy that integrates software development and IT
operations to deliver high-quality software faster and more reliably. It emphasizes automation,
continuous delivery, and collaboration across teams. Ian Sommerville (Software Engineering, 10th
Edition) describes DevOps as "an approach that integrates development and operations activities,
focusing on automation and continuous deployment to reduce delivery times."
Think of it like a well-coordinated kitchen: chefs (developers) and servers (operations) work together
seamlessly, using automated tools (e.g., ovens) to cook (build) and serve (deploy) meals (software)
quickly.
Example: For a library app, DevOps ensures “Borrow Book” is coded, tested, and deployed to users in
hours, not weeks, with minimal manual effort.
Purpose of DevOps
DevOps serves several key purposes:
• Speed Delivery: Reduces time from code to production (e.g., “RSVP Event” live fast).
• Improve Quality: Automates testing and monitoring (e.g., fewer bugs).
• Enhance Collaboration: Breaks silos between Dev and Ops (e.g., “We deploy together”).
• Increase Reliability: Ensures stable releases (e.g., “no downtime”).
• Enable Scalability: Supports growth (e.g., “handle 1,000 users”).
Example: A student portal uses DevOps to deploy “View Grades” updates daily with zero crashes.
Principles of DevOps
DevOps is guided by the CALMS framework:
1. Culture:
o Foster collaboration and shared responsibility (e.g., “Dev and Ops own quality”).
2. Automation:
o Automate repetitive tasks (e.g., testing, deployment).
3. Lean:
o Minimize waste, optimize flow (e.g., “skip manual checks”).
4. Measurement:
o Track performance (e.g., “deployment time,” “error rate”).
5. Sharing:
o Share tools, knowledge (e.g., “Ops teaches Dev about servers”).
Example: A game’s DevOps culture ensures “Shoot” is auto-tested and deployed, with metrics on lag.
DevOps Tools
• CI/CD: Jenkins, GitLab CI, CircleCI.
• Version Control: Git, GitHub, Bitbucket.
• IaC: Docker, Kubernetes, Terraform.
• Testing: Selenium, JUnit.
• Monitoring: Prometheus, Grafana, ELK Stack.
• Collaboration: Slack, Microsoft Teams.
Example: A library app uses Git for code, Jenkins for CI/CD, and Docker for deployment.
Benefits of DevOps
• Speed: Fast releases (e.g., “RSVP” in hours).
• Reliability: Fewer failures (e.g., “auto-tested”).
• Collaboration: Team unity (e.g., “Dev fixes Ops issue”).
Example: A game’s DevOps deploys “Level 1” daily with no downtime.
Real-World Example
• Success: Netflix uses DevOps for CI/CD, streaming updates seamlessly.
• Contrast: Traditional silos delayed the 2000s FBI Virtual Case File.
Key Takeaways
• DevOps integrates Dev and Ops for fast, reliable delivery.
• It uses CI/CD, IaC, and monitoring.
• Examples like event apps and Netflix show its automation role.
Real-World Example
• Success: Microsoft used CMMI to improve Windows reliability.
• Failure: The 1990s Denver Airport system ignored SPI, causing inefficiencies.
Key Takeaways
• SPI enhances software processes for better outcomes.
• It uses frameworks like CMMI, SPICE, and PDCA.
• Examples like event apps and Microsoft show its refinement role.
Real-World Example
• Success: Google secures Android with encryption and updates.
• Failure: Equifax 2017 breach from unpatched software.
Key Takeaways
• Software security protects against threats like injection and XSS.
• It uses practices like encryption and validation.
• Examples like event apps and Google show its protective role.
Real-World Example
• Success: IBM reengineered mainframe software for modern banking.
• Failure: The 2000s NHS IT ignored reengineering, scrapping a workable system.
Key Takeaways
• Reengineering improves legacy software without full replacement.
• It includes restructuring, refactoring, and reimplementation.
• Examples like event apps and IBM show its modernization role.
Real-World Example
• Success: Netflix’s cloud-native, AI-driven recommendations.
• Future: Quantum computing trials at IBM (e.g., optimization).
Key Takeaways
• Emerging trends like AI, cloud-native, and DevSecOps shape software’s future.
• They offer speed, security, and innovation.
• Examples like event apps and Netflix show their transformative role.
def borrow(self):
if self._available:
self._available = False
return True
return False
Development Process
1. Requirements:
o Define mobile needs (e.g., “offline RSVP”).
2. Design:
o UI/UX for touch (e.g., “big buttons”).
3. Development:
o Code with framework (e.g., Flutter Dart).
4. Testing:
o Emulators + real devices (e.g., “test on Samsung”).
5. Deployment:
o App stores (e.g., Google Play, App Store).
6. Maintenance:
o Update for OS changes (e.g., “iOS 18 fix”).
Book(this.title, this.available);
bool borrow() {
if (available) {
available = false;
return true;
}
return false;
}
}
class BorrowButton extends StatelessWidget {
final Book book;
BorrowButton(this.book);
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: () => book.borrow() ? print("Borrowed") : print("Unavailable"),
child: Text("Borrow"),
);
}
}
• Features: Offline caching, touch UI.
• Deploy: Google Play via CI/CD.
return (
<View>
<Text>{title} - Slots: {slots}</Text>
<Button title="RSVP" onPress={register} />
</View>
);
};
export default Event;
• Tools: React Native, Expo for testing.
• Test: Emulator (Pixel 6), real device (iPhone).
• Result: Cross-platform, lightweight RSVP.
Scenario: Add “location check-in” using GPS—update with sensor API.
Benefits
• Reach: Targets mobile users (e.g., “students on phones”).
• Experience: Leverages sensors (e.g., “scan QR for RSVP”).
• Speed: Frameworks accelerate dev (e.g., “Flutter cuts time”).
Example: A game’s mobile version uses accelerometer for “tilt controls.”
Real-World Example
• Success: WhatsApp’s cross-platform, lightweight design.
• Challenge: Early mobile apps struggled with fragmentation (e.g., 2000s Java ME).
Key Takeaways
• Mobile software engineering adapts to device constraints.
• It uses frameworks, CI/CD, and responsive design.
• Examples like event apps and WhatsApp show its mobile-first role.
@app.route('/api/borrow/<book_id>', methods=['POST'])
def borrow_book(book_id):
if books.get(book_id, {}).get("available"):
books[book_id]["available"] = False
return jsonify({"status": "success"})
return jsonify({"status": "unavailable"}), 400
• Deploy: Heroku, HTTPS enabled.
app.use(express.json());
app.get('/events', (req, res) => res.json(events));
app.post('/rsvp/:id', (req, res) => {
const event = events.find(e => e.id == req.params.id);
if (event && event.slots > 0) {
event.slots--;
res.json({ status: "success" });
} else {
res.status(400).json({ status: "full" });
}
});
Benefits
• Accessibility: No install needed (e.g., “open in Chrome”).
• Scalability: Cloud-ready (e.g., “handle campus-wide use”).
• Maintenance: Easy updates (e.g., “fix server-side”).
Example: A game’s web version runs on browser, no download required.
Real-World Example
• Success: Google Docs—web-based, real-time collaboration.
• Challenge: Early web apps (1990s) lacked interactivity.
Key Takeaways
• Web app engineering uses client-server and browser tech.
• It tackles compatibility, security, and UX.
• Examples like event apps and Google Docs show its reach.
@app.route('/borrow/<book_id>', methods=['POST'])
def borrow_book(book_id):
if books[book_id]["available"]:
books[book_id]["available"] = False
return jsonify({"status": "success"})
return jsonify({"status": "unavailable"}), 400
• Testing: Unit test:
python
CollapseWrapCopy
def test_borrow_book():
assert borrow_book("1")["status"] == "success"
• Deploy: Heroku, demo shows “Borrow” working.
Benefits
• Skills: Full-cycle experience (e.g., “design to deploy”).
• Portfolio: Tangible product (e.g., “show app”).
• Confidence: Real-world readiness (e.g., “I built this”).
Example: A game capstone with “Level 1” impresses recruiters.
Real-World Example
• Success: University teams build apps like “campus maps” for real use.
• Lesson: Scope management key (e.g., 2010s overambitious failures).
Key Takeaways
• Capstone projects integrate all SE concepts.
• They follow a lifecycle from problem to product.
• Examples like event apps show practical application.
Industry Practices
1. Agile at Scale:
o Scrum, SAFe for large teams (e.g., “sprints across departments”).
2. DevOps Integration:
o CI/CD, monitoring (e.g., “deploy daily”).
3. Microservices Architecture:
o Modular, scalable (e.g., “separate RSVP service”).
4. Quality Assurance (QA):
o Dedicated testing teams (e.g., “automated + manual”).
5. Technical Debt Management:
o Balance speed vs. cleanup (e.g., “refactor later”).
6. Customer Feedback Loops:
o Iterate based on use (e.g., “users want filters”).
Tools in Industry
• Project Management: Jira, Asana.
• Version Control: Git (GitHub Enterprise, GitLab).
• CI/CD: Jenkins, CircleCI.
• Cloud Platforms: AWS, Azure, Google Cloud.
• Monitoring: New Relic, Datadog.
• Collaboration: Slack, Microsoft Teams.
Example: An industry event app uses Jira for tasks, GitLab for code, and AWS for hosting.
app.listen(3000);
• Deploy: AWS, monitored by Datadog.
• Result: Scales to millions, updated monthly.
Benefits
• Experience: Real-world practice (e.g., “shipped a product”).
• Employability: Industry skills (e.g., “DevOps know-how”).
• Impact: Solves actual problems (e.g., “users benefit”).
Example: A game in industry scales to millions with microservices.
Real-World Example
• Success: Slack—Agile, DevOps, cloud-native success.
• Lesson: Poor planning sank 2000s NHS IT (over-budget, late).
Key Takeaways
• Industry SE balances tech with business needs.
• It uses Agile, DevOps, and scalable designs.
• Examples like event apps and Slack show its practical role.
Assignment 1: Domain Modeling and Design Class Diagram for a Student Portal
Related Topics: Topic 27 (Domain Model: Identifying Business Classes), Topic 28 (Domain Model
Associations), Topic 29 (Domain Model Attributes), Topic 33 (Design Class Diagram)
Objective
Understand object-oriented analysis and design by creating a domain model and refining it into a design
class diagram for a real-world system.
Task
Design a student portal system that allows students to view grades, register for courses, and check
schedules.
1. Domain Model:
o Identify at least 5 business classes (e.g., Student, Course).
o Define associations with multiplicity (e.g., “1 Student registers for * Courses”).
o List key attributes for each class (e.g., “Student: ID, name”).
2. Design Class Diagram:
o Refine the domain model into a DCD.
o Add visibility (e.g., -name: String), methods (e.g., +registerCourse(): Boolean), and
relationships.
3. Documentation:
o Write a 1-page explanation of your choices (e.g., “Why Course has slots?”).
Deliverables
• UML domain model diagram (hand-drawn or tool-based, e.g., StarUML).
• UML design class diagram.
• 1-page report (PDF).
Evaluation Criteria
• Completeness: All required classes, associations, and attributes included (30%).
• Accuracy: Correct UML notation and logical relationships (30%).
• Clarity: Clear diagrams and well-justified explanations (20%).
• Creativity: Thoughtful features beyond basics (20%).
Suggested Tools
• StarUML, Lucidchart, or pencil/paper.
Assignment 7: Lean Development of a Minimal Viable Product (MVP) for a To-Do App
Related Topics: Topic 46 (Lean Software Development)
Objective
Implement Lean principles to build an efficient, value-focused software product.
Task
Develop a simple web-based to-do app as an MVP.
1. Value Identification:
o Define core value (e.g., “add and view tasks”).
o List 2 wastes to avoid (e.g., “fancy UI,” “unused reports”).
2. Development:
o Build a minimal app (e.g., Flask):
▪ Add task (POST).
▪ View tasks (GET).
o Keep it lightweight (e.g., no database, use memory).
3. Feedback Loop:
o Simulate user feedback (e.g., “needs delete”).
o Plan next iteration (e.g., “add DELETE endpoint”).
4. Documentation:
o 1-page explanation of Lean choices.
Deliverables
• Source code (GitHub link, e.g., app.py).
• 1-page Lean rationale (PDF).
• Screenshot of app running.
Evaluation Criteria
• Lean Application: Waste minimized, value maximized (30%).
• Functionality: Add/view works (30%).
• Feedback Plan: Realistic iteration (20%).
• Documentation: Clear justification (20%).
Suggested Tools
• Flask (Python), VS Code, browser.
Below, I’ll briefly explain the examples I’ve used in the topics that involve "students," "events," or
related concepts (e.g., library apps, campus systems). These examples were chosen to be relatable
for BSIT students, reflecting scenarios they might encounter in academic or real-world settings. I’ll
reference the specific topics and assignments where they appear, focusing on their context and
purpose.
3. Library App
• Topics Used In:
o Topic 27 (Domain Model: Identifying Business Classes), Topic 28 (Domain Model
Associations), Topic 29 (Domain Model Attributes), Topic 33 (Design Class Diagram),
Topic 34 (Mapping Design to Code), Topic 40 (Risk Management), Topic 41 (Software
Metrics), Topic 42 (Agile Software Development), Topic 43 (Scrum Framework), Topic 47
(DevOps Basics), Topic 48 (Software Security Basics), Topic 49 (Software Reengineering),
Topic 58 (Mobile Apps), Topic 59 (Web Apps), Topic 61 (Industry).
o Assignment 3 (Agile Sprint), Assignment 8 (Reengineering).
• Example Description: A system (mobile, web, or desktop) where students/users borrow, return,
and search for books.
o Context: Simulates a campus or public library (e.g., “Borrow CS101”), with features like
“Search Book” or “Return Book.”
o Purpose: Shows domain modeling (e.g., User, Book, Loan), associations (e.g., “1 User
borrows * Books”), coding (e.g., borrowBook()), risk (e.g., “database crash”), metrics
(e.g., “bug density”), Agile/Scrum (e.g., sprint for “Return”), DevOps (e.g., CI/CD
pipeline), security (e.g., SQL injection fix), reengineering (e.g., C to Python), and industry
scale (e.g., “1M users”).
o Assignment Use: Students develop a feature iteratively (e.g., “Return Book” in Scrum)
and reengineer legacy code, applying process and modernization skills.