UML - OOD steps on the ticket vending machine (TVM)
3K views
Nov 28, 2024
UML - OOD steps on the ticket vending machine (TVM)
View Video Transcript
0:00
Object oriented design steps on the ticket vending machine
0:05
So in the previous video we have discussed what are the different steps in object
0:09
oriented ysis of this respective case study that is a TVM and prior to that
0:14
video we have discussed the problem statement. So in this video we are going to
0:18
show you are going to discuss on this object oriented design and what are the
0:24
different steps to be done in this TVM. In the object oriented ysis we do
0:29
the respective use case diagram we do the sequence diagram collaboration diagram and at the last we do the respective class diagram so now in this
0:41
case of object-oriented design the in this respective steps we shall be
0:46
drawing the component diagram the deployment diagram activity diagram structure diagram so let us go for the further details on it so at first
0:56
we're going to for the state chart diagram what is the state chart diagram state chart diagram will depict the change of states of one object in the system so here
1:07
you see this is a state chart diagram we are going to do so ready is the initial state
1:12
now request processing that is the generate request so request processing will be there
1:18
then accept cash then waiting for the confirmation then cash accepted balance processing and ticket
1:25
will be issued so here you were having this terminating state and here if there is some error then the balance error will come and again
1:34
it will be found in the ready state prior to this ready state I can also put
1:38
one starting state there so here this is a time out waiting for confirmation
1:43
for a certain duration of time for a certain time slice if the time has got
1:48
expired then the time out there will be there and then the state will be will
1:53
have the transition from the waiting for confirmation to the ready state
1:57
So this is a ticket purchase if you consider this respective object
2:01
So this is a straight transition diagram for it. We know that in case of real life projects there will be not a single structure diagram There will be multiple stretcher diagrams which will be required to denote the change of states of a certain object in the system
2:16
so now we are going for some sample codes for the to give the
2:21
guidance to the respective coder and developer so variables involved in the ticket transactor so type depth state
2:29
what are the states we are having one is the ready request processing wait for confirmation balance processing
2:36
and ticket issue. So these are the states we are having we've made one�p. That is an
2:41
enumeration here. So type dev event, what are the different event types? So there is a generate
2:46
request, accept cash, cash accepted timeout and the balance issued. Now we're having this
2:54
variables defined. So float fare, float cash deposited and float balance. So now we are going for
3:01
this. There is the different variables and the different enumerations which are required
3:06
for the tricket transactor. So C-do code for the event. So begin state is
3:12
equal to ready event handler colon switch event. So now we are having the
3:17
switch case statement depending upon the language in which we are going to
3:21
implement the respective syntax has to be followed here. So case generated
3:26
request colon so that is of one of the cases is that there call generate
3:31
request function and break. So case accept cash here call accept cache so there is a function to be called and then break so in this way
3:41
that is straight code has been written you can pause the video we can watch what are the
3:46
codes we have written here so pseudo code for the generate request so this is a
3:52
code for the generate request so if the state is not equal to ready then return error
3:57
otherwise state is equal to request processing and fear is equal to calculate the fear
4:02
from the requisition slip and return so this is the sample pseudo code for the better understanding here
4:09
So now in case of object-oriented design, we are now going for the implementation of the project
4:15
So that why the sample codes will help a lot for the developer to implement Next one is the code code for accept cash If state is not equal to request processing return error and then we having this
4:28
state is equal to wait for confirmation, issue deposit cash message to the cash
4:34
transactor and return. Now, this is our activity diagram. So in this particular activity diagram, here we're having this user ID
4:45
There is the initial state. we're having this user ID and enter the password if the password is not valid
4:51
invalid then again it will ask for the password entry and then if the password is
4:57
valid then it will come down to this choose type of report and then print the
5:01
report and then more report generation if it is required then it will go for the
5:06
choose the type of report that menu will come back again and otherwise report
5:11
generation will be completed and log out and that is a terminating state So this is known as the activity diagram
5:17
This activity diagram might be very much similar to your flowchard, but in the activity
5:21
diagram, respective chapter, you have discussed a lot that it is a flowchard, no issues
5:26
it is a flowchard. But this particular activity diagram is having some properties and features which are not
5:33
available in our flowchard. We can mention that which are the activities which can be executed in sequential fashion
5:40
in parallel, or maybe executing in a in a, swim lane so
6:03
this things we can mention in this activity diagram so this is the activity diagram here for this ticket vending machine so this is the component diagram in case of component diagram we are discussing what are the different components that will be used in our software development we know that component is nothing but maybe one file maybe one dlll maybe one package maybe one active x model maybe one applet so these are the respective component diagrams we're having so here will be
6:14
having the fair details or exc there is a ticket dot java so in this way they will get
6:19
integrated to go for the component diagram so depending upon the software architecture
6:23
what are the different components will be requiring to develop the software that will be depicted in the component diagram here we have suggested only a sample sample component diagram for the part for the real case studies obviously this component diagram will be will be in far more detail
6:41
so let us go for the deployment diagram so here you see the deployment diagram that visualizes
6:46
the distribution of components across the enterprise so in case of deployment diagram we're
6:51
dealing with multiple nodes these nodes can be categorized in two heads one is the processor and
6:57
another one is the respective device so device may be a dump terminal maybe a printer
7:02
maybe a card reader maybe a card puncher or any other input input devices and the processors
7:08
will have the processor inside which will be intelligent enough which can execute a code which can
7:15
execute one application so here we're having this database server there is a railway
7:20
reservation domain and here we're having this options that update options are there this
7:25
the respective processor and here we're having this TVM that is a front panel we're
7:30
having and they are connected by some communication network and in this way the
7:35
deployment diagram is visualizing how the distribution of components across the enterprise so in case of component diagram we are going to get the idea that
7:44
what are the components are required for the implementation of the software and in
7:49
case of deployment diagram we are telling that where these components are
7:52
going to get deployed so for that purpose this deployment diagram is there. In our real life case studies, obviously this deployment
7:59
diagram will be too much complicated. We have discussed lots of different aspects of this
8:03
deployment diagram in the deployment diagram chapter. Please watch all those chapters because
8:09
these particular case studies are the accumulation of those knowledgees which we have shared in the
8:14
earlier chapters. So we have considered in the first video of this case study we considered
8:20
the problem statement. In the next video we have discussed regarding the OA, that is
8:25
object-oriented ysis and in this video we have discussed the object-oriented design
8:31
I think now you are going to get one idea that whenever one project will be assigned to you
8:37
what are the steps to be followed, what is the process flow for development of that particular software
8:43
Thanks for watching this video
#Enterprise Technology
#Event Planning
#Helpdesk & Customer Support Systems
#Monitoring Software
#Programming
#Retail Equipment & Technology