Skip to content

nadvitek/Smart-Home

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smart Home

Summary

This application represents a virtual house that is controlled by smart appliances.

People and pets live in the house their normal live and they use the appliances or do some actions that appliances have to take care of.

Configurations

There are 2 configurations that can be found in src/main/configs that creates our house as its written.

Due to this configurations we create people, pets, rooms and appliances that are or live in the house.

There are four types of people that can be found in the house - Children, Mom, Dad and Grandparents

Children and their parents go to school/work everyday from Monday to Friday and Grandparents stay at home

The life in the house starts on Monday as the day 1, we can change number of days for our application as we want (default one week)

As the people and pets live in the house, they use appliances in the house

Examples for appliances

  • When people enter a room, light sensors will active lights, when last person leaves they turn lights off
  • When they leave the house and it's empty, house automaticly locks itself
  • Lawnmower lawns the garden (takes time according to the area of garden) and fish tank filter cleans the tank every week
  • Blinds pull up every morning at 6:30 / 8:30 in the weekends and down every night
  • Vacuum cleans any room that gets dirty (dust sensors send signal whan that happens) on the floor it's on
  • The heating in rooms is on whenever somebody is inside, when room is empty, it turns off
  • People in the house use toilets and they cook 3 meals a day(when they are in work/school, they skip lunch)
  • When the day ends, they put some clothes in the wasching machine, when it's full, it sends signal to be turned on and adults will start it
  • In kitchen people use appliances like fridge, microwave or oven to prepare the meal, they fill dishwasher when they are done, which like washing machine sends signal when it's full

Some freetime activities for people

  • Riding a bike
  • Go skiing
  • Watching TV
  • Go to the gym
  • Watching the TV
  • Listening to music
  • Solving events
Solving events means that they repair something or clean or they must do something with appliances

Used Design Patterns

  • Singleton - the house is the only one (one instance of the class)
  • Iterator - when a person solves some Events, he gets EventIterator from list of waiting events that are made for him(children do something and adults something else)
  • Lazy Initialization - In the house, everyone has Bike and Ski, but there is little chance, that everyone will use it. So we create it only if the time for its use comes
  • Factory Method - EventCreator, ReportCreator
  • Observer - the pool or every room will be creating Events if they will be dirty enough to tell some people to clean them

Output of the application

You will find the output file of the application in src/main/output directory.

It is a .txt file that contains configuration of the house and all event reports that had been solved.

Then there is how much energy did the appliances consume and how much money did it cost.

And the last information we will get is who used which appliances how many times.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages