UML Question in Exams:-
Consider the class for telephone line with following activities and states:
As a start of a call, the telephone line is idle. When the phone receiver is picked from hook, it gives a dial tone and can accept the dialing of digits.
If after getting dial tone, if the user doesn’t dial number within time interval then time out occurs and phone line gets idle.
After dialing a number, if the number is invalid then some recorded message is played.
Upon entry of a valid number, the phone system tries to connect a call & routes it to proper destination.
If the called person answers the phone, the conversation can occur. When called person hangs up, the phone disconnects and goes to idle state.
Draw the state transition diagram for above description of telephone line.
State Transition Diagram of Telephone Line:-