Giter VIP home page Giter VIP logo

educational_initiatives's Introduction

Smart Home System

The Smart Home System is a Java-based application that simulates a smart home system, allowing us to control various smart devices such as lights, thermostats, and door locks via a central hub. Users can set schedules, automate tasks, view device status & reports, and manage triggers.

Built with

Java (JDK-20)

Getting started

  • Clone the repository
     git clone https://github.com/deveshparmar/Educational_Initiatives.git
  • Compile the project
    javac src/SmartHomeSystem/*.java src/SmartHomeSystemExceptions/*.java
  • Run the Main.java (Entry Point)
    java -cp src Main

Project Structure

  • src/ - Source code directory
    • SmartHomeSystem/ - Main package for the application
      • Device.java - Interface representing smart home devices
      • DeviceFactory.java - Factory class for creating devices
      • DeviceObserver.java - Interface for observing device updates
      • DeviceProxy.java - Proxy class for device access
      • Light.java - Class representing light devices
      • Thermostat.java - Class representing thermostat devices
      • Door.java - Class representing door devices
      • SmartHomeHub.java - Main smart home hub class
      • Trigger.java - Class for defining automation triggers
      • Schedule.java - Class for defining schedule for devices
      • Main.java - Application entry point
    • SmartHomeSystemExceptions/ - Package for custom exceptions
      • UnsupportedActionException.java - Custom exception for unsupported actions
      • InvalidTriggerException.java - Custom exception for invalid triggers
      • UnauthorizedAccess - Custom exception for unauthorized access of device

Features

  • Initialize the Smart Home System with different devices, each having a unique ID and type (light, thermostat, door lock).
  • Turn devices on/off.
  • Schedule devices to turn on/off at a particular time.
  • Automate tasks based on triggers.
  • Add and remove devices dynamically.
  • Custom exceptions for handling unsupported actions and invalid trigger conditions.
  • Logging for each component activity

UML diagram

image

Output Screenshots

  1. Output image

  2. Logging for error and Custom Exception image

educational_initiatives's People

Contributors

deveshparmar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.