SE Lab Manual
SE Lab Manual
COURSE PRE-REQUISTIES
COURSE OBJECTIVES
S.NO DESCRIPTION
4 To describe the approaches to verification and validation using static and dynamic testing.
6 To gain knowledge of basic Software Engineering methods and practices, and their
appropriate application.
COURSE OUTCOMES
S.NO DESCRIPTION
1 Apply the system development life cycle for any Business system
3 Specify the business requirements through appropriate system analysis and design.
5 Implement and demonstrate any business system software from specification to validation
and verification.
6 Analyze the Software Requirements Specifications and modelling
SYLLABUS
LIST OF EXPERIMENTS
Prepare the following documents for any one of the above experiments and develop the software using
software engineering methodology.
TOTAL: 30 PERIODS
COGNITIVE LEVEL ATTAINMET
Quiz System
2 3 CO1 Remember
Stock maintenance.
9 3
CO4 Analyze
LIST OF EXPERIMENTS
6
Expert system to prescribe the medicines for the given symptoms
7 ATM system
8
Platform assignment system for the trains in a railway station
Stock maintenance.
9
ATM SYSTEM
1. Introduction
2. Functional Requirements
User Authentication:
Users should be able to authenticate themselves using PINs, biometric data, or
other secure methods.
The system must enforce security measures to prevent unauthorized access.
Transaction Processing:
Support cash withdrawals from various account types (e.g., checking,
savings).
Allow balance inquiries for account checking.
Enable cash deposits into designated accounts.
Facilitate fund transfers between accounts (internal and external).
Receipt and Statement Generation:
Provide options for printing receipts for each transaction.
Allow users to request mini-statements or account statements.
Language Selection and Accessibility:
Support multiple languages for user interface interaction.
Ensure accessibility features for users with disabilities (e.g., Braille keypad,
audio instructions).
Error Handling and Recovery:
Handle errors gracefully and provide clear instructions to users.
Support transaction rollback and recovery in case of system failures.
Security Features:
Encrypt communication between the ATM and the bank's server.
Implement physical security measures to prevent tampering or unauthorized
access to internal components.
3. Non-functional Requirements
Performance:
Process transactions within a predefined response time (e.g., <10 seconds).
Support a minimum number of concurrent users without degradation in
performance.
Reliability:
Ensure high availability of the ATM system (e.g., 99.9% uptime).
Implement redundant components and failover mechanisms to minimize
downtime.
Usability:
Design an intuitive user interface with clear instructions and feedback.
Minimize the number of steps required to complete common transactions.
Security:
Comply with industry standards for ATM security (e.g., PCI DSS).
Implement measures to detect and prevent fraudulent activities (e.g., card
skimming).
Scalability:
Design the system to accommodate future growth in the number of users and
transactions.
Ensure scalability of hardware and software components.
5. Glossary
Define any technical terms or acronyms used in the document for clarity.
6. References
7. Revision History
Maintain a record of changes made to the document over time, including the date of
each revision and a brief description of the changes.
8. Approval
Obtain signatures from key stakeholders to indicate their approval of the requirements
specification.
Function-oriented design using Structured Analysis (SA) and Structured Design (SD) for an
ATM (Automated Teller Machine) involves breaking down the system into smaller
functional modules and designing their interactions. Here's a simplified outline of how
SA/SD might be applied:
1. Identify Functions:
Begin by identifying the primary functions of the ATM system.
These might include:
User Authentication
Account Inquiry
Cash Withdrawal
Cash Deposit
Funds Transfer
Statement Generation
Receipt Printing
Error Handling
2. Create Data Flow Diagrams (DFDs):
Develop DFDs to represent the flow of data between these functions. Level 0 DFD
gives a high-level overview of the entire system, while subsequent levels (Level 1,
Level 2, etc.) provide more detailed views of each function.
Each function will have inputs, processes, and outputs. Inputs might be user inputs,
data from the bank's database, etc. Processes represent actions performed on the data,
and outputs are the results produced.
3. Define Data Stores:
Identify data stores where information is stored temporarily or permanently. For
example, a temporary data store might hold user input during a transaction, while a
permanent data store might store account information.
4. Identify Control Flows:
Determine the control flows between functions. This includes the sequence in which
functions are executed and any decision points (e.g., if a user enters a wrong PIN).
5. Create Entity Relationship Diagrams (ERDs):
ERDs can be used to model the relationships between entities such as users, accounts,
transactions, etc.
6. Develop Structured Design:
Once the analysis is complete, move to structured design where each function
identified in SA is further decomposed into smaller, manageable modules.
Use techniques like Structured English, Decision Tables, and Decision Trees to
specify the logic of each module.
Ensure that each module has a single, well-defined purpose and that data and control
flow are clearly delineated.
7. Design Data Structures and Algorithms:
Design the data structures and algorithms needed to implement each module. This
might involve defining data structures for representing user accounts, transactions,
etc., and algorithms for tasks like validating user inputs, processing transactions,
updating account balances, etc.
8. Iterate and Refine:
Review and refine the design iteratively based on feedback and testing results. Ensure
that the design meets functional requirements, is modular, maintainable, and efficient.
9. Documentation:
Document the design thoroughly, including DFDs, ERDs, module specifications, data
structures, algorithms, etc. This documentation will serve as a reference for
developers implementing the system and for future maintenance.
10. Implementation:
Finally, the design is implemented using programming languages and technologies
appropriate for the platform (e.g., Java, C++, etc.).
Throughout the SA/SD process, it's essential to involve stakeholders, including end-users, to
ensure that the design meets their needs and expectations. Additionally, adherence to best
practices in software engineering, such as modularity, encapsulation, and abstraction, will
contribute to a robust and maintainable ATM system.
Designing an ATM system using Object-Oriented Analysis and Design (OOAD) involves
modeling the system's structure and behavior using UML (Unified Modeling Language).
Here's a high-level overview of how you can approach Object-Oriented design for an ATM
using UML:
1. Identify Classes:
ATM: Represents the ATM machine itself, including its physical components and
software.
User: Represents the person interacting with the ATM.
Account: Represents a bank account associated with a user.
Transaction: Represents various types of transactions such as withdrawals, deposits,
transfers, etc.
ATM:
Attributes: ID, Location, BankID, etc.
Methods: authenticateUser(), processTransaction(), dispenseCash(), etc.
User:
Attributes: UserID, Name, PIN, etc.
Methods: insertCard(), enterPIN(), selectTransaction(), etc.
Account:
Attributes: AccountNumber, Balance, Type, etc.
Methods: checkBalance(), withdraw(), deposit(), transfer(), etc.
Transaction:
Attributes: TransactionID, Amount, Timestamp, Type, etc.
Methods: execute(), validate(), logTransaction(), etc.
3. Model Relationships:
Association:
ATM has multiple Users.
User can have multiple Accounts.
Account can have multiple Transactions.
Inheritance:
Different types of Transactions (e.g., Withdrawal, Deposit, Transfer) can inherit from
a base Transaction class.
Composition/Aggregation:
ATM consists of a Card Reader, Keypad, Cash Dispenser, etc.
User interacts with the ATM's User Interface.
5. Model Behavior:
Sequence Diagrams:
Illustrate the sequence of interactions between objects during various scenarios (e.g.,
ATM transaction).
Show the flow of messages between objects over time.
State Diagrams:
Model the different states and state transitions of objects (e.g., ATM states: Idle,
Processing, Out of Service).
Define the events triggering state transitions.
6. Design Patterns:
Apply design patterns to solve common design problems and improve the system's
structure.
Examples: State Pattern for modeling ATM states, Strategy Pattern for transaction
processing, etc.
Review the UML diagrams with stakeholders and domain experts to ensure they
accurately represent the system's requirements and behavior.
Refine the design based on feedback and make necessary adjustments.
9. Implementation:
Translate the UML design into code using an object-oriented programming language
like Java, C++, etc.
Follow best practices such as encapsulation, inheritance, and polymorphism.
10. Testing and Validation:
Test the implemented system to verify that it meets the specified requirements.
Validate the system against use cases, scenarios, and user stories.
By following these steps, you can create a well-designed ATM system using Object-Oriented
Analysis and Design principles and UML notation, resulting in a modular, maintainable, and
scalable solution.
Login Authentication:
Test valid user login with correct PIN.
Test invalid user login with incorrect PIN.
Test login timeout due to inactivity.
Transaction Processing:
Test cash withdrawal with sufficient funds.
Test cash withdrawal with insufficient funds.
Test cash deposit with valid amount and account.
Test cash deposit with invalid amount or account.
Test balance inquiry for various account types.
Test fund transfer between accounts.
Error Handling:
Test error handling for network failure during a transaction.
Test error handling for hardware failure (e.g., cash dispenser jam).
Security Features:
Test security measures such as encryption during communication.
Test authentication mechanisms against unauthorized access.
User Interface:
Test user interface for clarity and ease of use.
Test accessibility features for users with disabilities.
Prioritize test cases based on their importance, criticality, and frequency of use.
Focus on testing high-risk and high-impact scenarios first.
Generate or create test data to cover various scenarios and edge cases.
Include valid and invalid inputs to test boundary conditions and error handling.
Execute each test case systematically, following the defined steps and inputs.
Record the actual results observed during test execution.
Document the outcomes of each test case, including any discrepancies between
expected and actual results.
Log any defects or issues identified during testing.
8. Regression Testing:
Perform regression testing to ensure that new changes or fixes do not introduce
regressions in existing functionality.
Re-run previously executed test cases to validate system stability.
9. Automation (Optional):
Continuously refine and improve the test suite based on feedback, evolving
requirements, and lessons learned from previous testing cycles.
By following this structured approach to test case design, you can thoroughly evaluate the
functionality, usability, security, and reliability of the ATM system, ensuring that it meets the
needs and expectations of its users while maintaining high quality and reliability.
IMPLEMENTATION USING C++ AND TESTING
Implementing an ATM system in C++ involves designing and coding the various components
such as the user interface, transaction processing, authentication, and error handling. Here's a
simplified outline of how you might approach the implementation, followed by a basic
example of an ATM system in C++, along with testing steps:
Implementation Steps:
1. Design Classes: Define classes for the ATM, User, Account, Transaction, etc. Identify their
attributes and methods.
2. Implement User Interface: Develop functions to display screens, receive user input, and
provide feedback.
3. Implement Transaction Processing: Write functions for cash withdrawal, deposit, balance
inquiry, fund transfer, etc.
4. Implement Authentication: Implement methods for user authentication using PIN or other
mechanisms.
5. Handle Errors: Implement error handling mechanisms for various scenarios such as
insufficient funds, network errors, etc.
6. Integrate with Bank System: Simulate interactions with a bank system to validate
transactions and update account balances.
7. Testing: Develop test cases to verify the functionality of the ATM system, including positive
and negative scenarios.
Testing Steps:
By following these testing steps, you can ensure that the ATM system behaves as expected
under various scenarios and conditions, providing a reliable and secure user experience.
CASE Tools:
1. Git:
Git is a widely-used distributed version control system that allows developers to track
changes, manage branches, and collaborate on code development. It provides features
for branching and merging, enabling concurrent development of features and bug
fixes.
2. GitHub, GitLab, Bitbucket:
Platforms like GitHub, GitLab, and Bitbucket provide hosting services for Git
repositories. They offer additional features such as issue tracking, project
management, and pull request workflows, facilitating team collaboration and code
review.
3. Continuous Integration (CI) Tools:
CI tools like Jenkins, Travis CI, or CircleCI automate the build and testing process for
software projects. They integrate with version control systems to trigger builds
automatically whenever changes are pushed to the repository, ensuring code quality
and early detection of issues.
4. Dependency Management Tools:
Dependency management tools like CMake or Conan help manage external libraries
and dependencies in C++ projects. They simplify the process of including and linking
external libraries, ensuring consistent builds across different environments.
5. Documentation Tools:
Documentation tools like Doxygen or Javadoc generate documentation from source
code comments. They automate the generation of API documentation, class diagrams,
and other technical documentation, improving code readability and maintainability.
6. Issue Tracking Tools:
Issue tracking tools like Jira, Trello, or Redmine help manage and prioritize tasks,
bugs, and feature requests. They provide features for assigning tasks, tracking
progress, and communicating with team members, ensuring transparency and
accountability in project management.
During the design phase, UML modeling tools can be used to create class diagrams
and sequence diagrams to visualize the system architecture and behavior.
Code editors/IDEs are used for writing and debugging the C++ code implementing
the ATM system.
Version control systems like Git are employed to track changes to the source code,
enabling collaboration and facilitating code review processes.
Continuous integration tools automate the build and testing process, ensuring that
changes to the codebase do not introduce regressions or break existing functionality.
Configuration management tools help manage dependencies, documentations, issues,
and project workflows throughout the software development lifecycle.
Static Analysis Tools: Use static analysis tools to review requirements documents
and identify potential security vulnerabilities or compliance issues early in the
development process. Tools like SonarQube or CodeSonar can help detect
inconsistencies, ambiguities, or incomplete specifications in the requirements.
2. Design Phase:
UML Modeling Tools: Employ UML modeling tools such as Enterprise Architect or
Visual Paradigm to create detailed design diagrams for the ATM system. These tools
aid in visualizing system architecture and behavior, ensuring that design decisions
align with requirements and best practices.
3. Implementation Phase:
Static Code Analysis Tools: Utilize static code analysis tools like Coverity or PVS-
Studio to analyze source code for defects, coding standards violations, and potential
security vulnerabilities specific to ATM functionalities. These tools help identify
issues such as buffer overflows, input validation flaws, or authentication weaknesses.
Dynamic Code Analysis Tools: Use dynamic code analysis tools like Valgrind or
AddressSanitizer to detect runtime errors, memory leaks, and performance
bottlenecks in the ATM software during execution. These tools provide insights into
program behavior and help optimize code performance and reliability.
4. Testing Phase:
Unit Testing Tools: Implement unit testing frameworks like Google Test or Catch2 to
automate the testing of individual units or components of the ATM software. Create
test cases to validate functionalities such as cash withdrawal, balance inquiry, or
transaction processing, ensuring code correctness and reliability.
Security Testing Tools: Conduct security testing using tools like OWASP ZAP or
Burp Suite to identify vulnerabilities such as injection flaws, authentication bypass, or
sensitive data exposure in the ATM system. Perform penetration testing to assess the
resilience of the system against attacks.
By leveraging program analysis tools effectively at each stage of the software development
life cycle, organizations can build and maintain secure, reliable, and high-performance ATM
systems that meet the needs of customers and regulatory requirements.