Security_Device

Security Device

A project demonstrating the use of Finite Automata concepts to solve real-life problems by simulating a security device.

Author

Mitansh Chaudhari
License: Public Domain - Anyone can use, modify, or incorporate code from this software into their applications.


Table of Contents

  1. Introduction
  2. Features
  3. How to Build and Run
  4. Generating Unit Test Coverage
  5. Platform Tested On
  6. Screenshots

Introduction

This program simulates a security device, similar to those found in homes and offices. It uses a combination of user-entered strings and random number-generated strings to simulate locking and unlocking mechanisms.
The project is divided into two parts:

  1. User input-based locking/unlocking.
  2. Random number generator-based locking/unlocking.

Features

Part 1: User Input Simulation

Part 2: Random Number Generator Simulation


How to Build and Run

  1. Clone the repository:
    git clone https://github.com/MitChaudhari/Security_Device.git
    
  2. Install Python 3 if not already installed:
    python3 --version
    

    If not installed, download from Python Official Website.

  3. Navigate to the app folder:
    cd Security_Device/app
    
  4. Run the interface files to test functionalities:
    • For Part 1:
      python InterfaceSecurityEngine.py
      
    • For Part 2:
      python InterfaceRanNumGen.py
      

Generating Unit Test Coverage

Prerequisites

Ensure pip and coverage are installed:

python3 -m pip install coverage

Steps

  1. Navigate to the app folder:
    cd Security_Device/app
    
  2. Generate coverage for SecurityEngine.py:
    coverage run test_security_engine.py
    coverage report
    
  3. Generate coverage for RanNumGen.py:
    coverage run test_ranNumGen.py
    coverage report
    

Platform Tested On


Screenshots

Terminal View

InterfaceSecurityEngine.py

InterfaceSecurityEngine.py

InterfaceRanNumGen.py

InterfaceRanNumGen.py