Professional Documents
Culture Documents
Team 4: Arjun Sambamoorthy Anuradha Dhawan Chandan Mahalingappa Karthikkumar Annamalai Praabhu Kannappan
TABLE OF CONTENTS 1. INTRODUCTION 1.1 Purpose 1.2 Scope 1.3 Assumption 1.4 Appliances and Functions 2. USE CASE DIAGRAM 2.1 Introduction 2.2 HACS Use Case Diagram 2.3 Explanation of Use Case Diagram 3. SEQUENCE DIAGRAM 3.1 Introduction 3.2 Sequence Diagram for Login 3.3 Sequence Diagram for Microwave 3.4 Sequence Diagram for Electric Stove 3.5 Sequence Diagram for TV/VCR 3.6 Sequence Diagram for Add/Remove Device 3.7 Sequence Diagram for Fire Alarm 3.8 Sequence Diagram for Home Security 4. CRC CARDS 4.1 Introduction 4.2 CRC Card for Login 4.3 CRC Card for HACS 4.4 CRC Card for Microwave 4.5 CRC Card for TV/VCR 4.6 CRC Card for Home Security 4.7 CRC Card for Fire Alarm 5. CLASS DIAGRAM 5.1 Introduction 5.2 Class Diagram for HACS 5.3 Class Diagram Description 3 3 3 3 3 4 4 4 5 6 6 6 7 8 9 10 11 12 13 13 13 14 14 15 15 16 17 17 17 18
1. INTRODUCTION 1.1. Purpose HACS is a system controlled by a remote system such as mobile phone or palmtop and at the same time controls, monitors and co-ordinates home appliances microwave, TV/VCR, Bath tub controller, home security, Air conditioner etc.The document furnishes the detailed design with all the UML diagrams. It encompasses CRC cards, Use Case Diagrams, Sequence Diagrams and Class Diagrams for home appliance control system (HACS). 1.2. Scope
1.3. Assumption The HACS model is constrained by the following assumptions. This project will provide only a virtual simulation of the HACS system The hardware interface handles proper communication between HACS controller and the respective devices. The implementation of this hardware is beyond scope. New devices can be added or existing devices can be removed with no hiccups. There is a dedicated controller (link) for the HACS interface.
1.4. Appliances and functions 1.4.1. Microwave The functions for microwave are, Turn on the device Turn off the device Setting the temperature Setting the timer Setting the clock Scheduling the timer 1.4.2. Electric stove The functions for electric stove are, Setting the temperature
Turn off the stove Turn on the stove 1.4.3. TV / VCR The functions for TV/VCR are, Turn off the device Turn on the device Setting the Timer 1.4.4. Home security system The functions for Home Security are, Notify the Police department in case of breakage Notify the User in case of breakage Monitor the hardware for signals 1.4.5. Fire alarm The functions for Fire Alarm system are, Notify the fire department in case of fire Notify the user in case of fire Monitor the hardware for signals 2. USE CASE DIAGRAM 2.1. Introduction Use case diagram shows a set of use cases and actors (a special kind of class) and their relationships. You apply use case diagrams to illustrate the static view of a system. Use case diagrams are especially important in organizing and modeling the behaviors of a system. 2.2. HACS use case diagram: Figure 1.1 shows an overall view of the HACS system.
a dd /re m o ve de vices
m icrow a ve o p tio ns
< < inc lude> >
Ho m e O w ne r
TV ,V C R o p tions
< < inc lude> > < < inc lude> >
Ha rd W a re
lo gin
F ire D ep t
po lice de p t
2.3. Explanation of use case diagrams Login: The login will get the user name and the password for the HACS system. Add/remove devices: After logging into the HACS system the user can add/remove any number of devices. Microwave options: The microwave options enable a user to set values to microwave, like set the temperature to heat a food stuff etc.
TV/VCR options: The TV/VCR options enable a user to set values to the TV, like when the television should be turned off. Electric Stove options: The electric stove options enable a user to set values to the electric stove, like what temperature should be maintained. Home Security options: The home security options enable a user to either turn on or turn off the home security device.
3. SEQUENCE DIAGRAM 3.1. Introduction A sequence diagram is an interaction diagram that emphasizes the time ordering of messages. A sequence diagram shows a set of roles and the messages sent and received by the instances playing the roles. You use sequence diagrams to illustrate the dynamic view of a system. 3.2. Sequence diagram for login Figure 1.2 shows the sequence diagram for login
:HACS s/m
3: authenticate
4: Ack
5: access
Flow of events: The user should enter the user name and the password to log into the HACS system. The user name and the password will be sent to the HACS system. The HACS system will authenticate whether the user is a valid user or not. Once the HACS system confirms that the user is a valid user it acknowledges the user. Now the user can access the HACS system. 3.3. Sequence diagram for microwave Figure 1.3 shows the sequence diagram for microwave
Micro wave
5: display options
6: select options : turn on/off/timer/clock/schedule 7: enter value turn on/off/timer/clock/schedule 8: set value 9: update
Flow of events: The user selects the microwave device. The HACS system will check the status of the appliance The Microwave responds back to the HACS system with the status. The HACS system will now display the status of the device The HACS system will display the menu options that the user can select. The user selects the option that he wants to change. The user then enters the value for the selected option. The HACS system will set the value to the microwave. The microwave will update the values set by the user The microwave acknowledges the HACS system after updating the values. The HACS system would display the result. 3.4. Sequence diagram for Electric Stove Figure 1.4 shows the sequence diagram for electric stove
:HACS s/m
:Electric stove
2: check status
3: return status 4: Display status 5: Display options 6: select options : turn on/off/temperature 7: enter value turn on/off/tem perature 8: set value
9: update value
Flow of events: The user selects the electric stove device. The HACS system will check the status of the appliance The electric stove responds back to the HACS system with the status. The HACS system will now display the status of the device The HACS system will display the menu options that the user can select. The user selects the option that he wants to change. The user then enters the value for the selected option. The HACS system will set the value to the electric stove. The electric stove will update the values set by the user The electric stove acknowledges the HACS system after updating the values. The HACS system would display the result. 3.5. Sequence diagram for TV/VCR Figure 1.5 shows the sequence diagram for TV/VCR
:HACS s/m : Home Owner 1: Select TV/VCR 2: Check status 3: Return Status 4: Display Status and menu
:TV/VCR
7: Update
8: ACK
9: Display result
Flow of events: The user selects the TV/VCR device. The HACS system will check the status of the appliance The electric stove responds back to the HACS system with the status. The HACS system will now display the status and menu options of the device. The user selects the option that he wants to change. The HACS system will set the value to the electric stove. The electric stove will update the values set by the user The electric stove acknowledges the HACS system after updating the values. The HACS system would display the result. 3.6. Sequence diagram for Add/Remove devices Figure 1.5 shows the sequence diagram for Add/Remove devices
:H C s A S /m :H m O n r o e we
2 c e k p s ib : h c s o s lity
5 U d te : pa
6 R tu s tu : e rn ta s
7 u d te : pa s
8 c a g m n o tio s : hne eu p n
9 d p yre u : is la s lt
Flow of events: The user selects the Add/remove device option The HACS system will check the possibility to add/remove the device. The HACS system will now add/remove the device. The HACS system will notify the Hardware about the changes made. The hardware updates the addition or removal of the device. The hardware returns the status to the HACS system. The HACS system will update the changes made. The HACS system will change the menu options The HACS system will now display the result to the user. 3.7. Sequence diagram for fire alarm Figure 1.6 shows the sequence diagram for fire alarm
:H A C S s /m
: F ire A la rm : H a rd W a re
1 : M o n ito r
: F ire D e p t 2 : R e tu rn S ig n a l
: H o m e O w ne r 3 : N o ti fy F ire d e p t
4 : N o ti fy H A C S 5 : D is p la y w a rn i n g
Flow of events: The Fire alarm will ask the hardware to monitor for fire. The hardware returns a signal to the fire alarm in case of fire. The Fire alarm will notify the fire department. The fire alarm will notify the HACS system. The HACS system will display the warning message to the user. 3.8. Sequence diagram for home security system Figure 1.6 shows the sequence diagram for fire alarm
: Home Owner
:HACS s/m
: Home Security
3: Return Status
4: Display status
9: Return Signal
Flow of events: The user selects the Home Security device. The HACS system will check the status of the appliance The electric stove responds back to the HACS system with the status. The HACS system will now display the status of the device The user then enters the value for the selected option. The HACS system will set the value to the electric stove. The home security will update the values set by the user If the set value is on then the home security system will ask the hardware to monitor. The hardware will return a signal to the home security in case of burglary. The home security system will notify the police. The home security system will notify the HACS system The HACS system will display the warning message to the user.
4. CRC CARDS 4.1. Introduction The Class Responsibility Collaboration Cards gives the responsibilities of each and every class that are included and their collaboration with the other classes that are available in the system. 4.2. Login
Login Responsibilities Get the username and password from the user Send Username and Password to system Collaboration HACS
4.3. HACS
HACS Responsibilities Authenticates username/password Helps the user to select the appliance by displaying the menu Check the status Display the Status Helps the user to add/remove device Interacts with appliances
Figure 1.9 CRC for HACS
Collaboration
Appliance
4.4. Microwave
Microwave Responsibilities Interacts with HACS Set the clock, schedule, temperature and timer values Start cooking at the scheduled time Inform the HACS when temperature crosses threshold value
Figure 1.10 CRC for Microwave
Collaboration HACS
4.5. TV / VCR
TV/VCR Responsibilities Set the parameter for time Return status to HACS Interacts with HACS Collaboration HACS
Home Security System Responsibilities Return status to HACS Interacts with HACS Ask the hardware to monitor for burglary Receive signal from Hardware Notify police and user in case of burglary
Figure 1.12 CRC for Home Security System
Collaboration HACS
Fire Alarm Responsibilities Interacts with HACS Ask the hardware to monitor for fire Receive signal from the hardware Notify fire service and user on fire
Figure 1.13 CRC for Microwave
Collaboration HACS
5. CLASS DIAGRAM 5.1. Introduction Class diagram shows a set of classes, interfaces, and collaborations and their relationships. These diagrams are the most common diagram found in modeling objectoriented systems. Class diagrams address the static design view of a system. Class diagrams that include active classes address the static process view of a system. Component diagrams are variants of class diagrams. 5.2. Class Diagram for HACS Figure 1.14 shows the class diagram for HACS
+access
1
Electric stove
temperature setTemperature() turnOn() turnOff()
Appliance deviceName status turnOn() turnOff() checkStatus() displayStatus() Fire Alarm Home Security TV/VCR
timer setTimer() turnOn() turnOff() notifyDepartment() monitor() receiveSignal() notifyUser() turnOn() turnOff() <<realize>> monitor() receiveSignal() notifyDepartment() notifyUser() turnOn() turnOff() <<realize>>
Micro Wave
timer clock temperature setTimer() setClock() setTemperature() setSchedule() turnOn() turnOff()
Inotify
signal deptName deptPhoneNo notifyUser() monitor() notifyDepartment()
The login class has attributes username and password enter username() Gets username from user enter passwd() Gets password from user
Has attributes Appliance Name, Username and password displayMenu() Displays the menu to the user on the PDA/Mobile selectDevice() The user is allowed to select a particular device he wants to operate. add/removeDevice() User is allowed to add a new device or remove the existing device. authenticate() this method authenticates username and password entered by user. createNewUser() A user can signup to use the HACS system changePasswd() User is allowed to change the existing password.
Has attributes device name and status turnOn() This is an abstract method, implementation is done in the subclass. turnoff() This is an abstract method, implementation is done in the subclass. checkStatus() It will check the status of every appliance . displayStatus() Displays the status checked to the user.
Electric Stove:
Electric stove
temperature setTemperature() turnOn() turnOff()
Figure 1.15 Class for Electric Stove
Has the attribute temperature. setTemperature() Sets the temperature for cooking turnOn() turns on the device. turnoff() turns off the device.
TV/VCR:
Has the attributes timer, clock and temperature. setTimer() Sets the timer. setClock() Sets the clock for cooking. setTemperature() Sets the temperature for heating. setSchedule() schedules the time for cooking. turnOn() turns on the device. TurnOff() turns off the device.
TV/VCR
timer setTimer() turnOn() turnOff()
Figure 1.15 Class for TV/VCR
Has the attribute timer. setTimer() Sets the time for turning on or turning off TV/VCR. turnOn() turns on TV/VCR. turnOff() turns off TV/VCR.
Interface Inotify:
Inotify
signal deptName deptPhoneNo notifyUser() monitor() notifyDepartment()
Figure 1.15 Interface Class for Inotify
Has the attributes signal, deptName and deptPhoneNo. Abstract methods specified here are, 1. notifyUser() 2. monitor() 3. notifyDepartment()
notifyDepartment() It notifies the police department in case of breakage. monitor() will request the hardware to monitor. receiveSignal() receives the signal for the hardware. notifyUser() notifies the user in case of breakage. turnOn() turns on the device. turnOff() turns off the device.
monitor() will request the hardware to monitor. receiveSignal() receives the signal for the hardware notifyDepartment() It notifies the police department in case of breakage. notifyUser() notifies the user in case of breakage. turnOn() turns on the device. turnOff() turns off the device.