Tool and techniques
Tool and techniques, I have used in my program are:
Class Diagram
I have used class diagram because if it a useful diagram that allows me to create clear map
of structure such as understanding and planning. The components of my class diagram
consist of class and method. The classes of my program are person, prisoner, staff and
visitor. I used class diagram to express the methods in my class so it will be easy for me to
create my program and making sure I have lists everything.
Class
Class summarises the data and its behaviour. Objects with similar purpose and meaning
grouped together as class. I have created a person class because the prisoner, staff and
visitor have some same basic questions so by creating the person class, I do not have to
repeat the same questions again for every class.
Methods
Methods determine the action that an object can perform of a class. The statements of
method are executed when it called by program. I have used method to return certain text, it
allows string variable set as parameters of method. I have to specify an argument of the
method so it can be applied in the end of result.
Example of method I have used in the program are WriteLine (), this message is used to
display required message to the user on the output stream and ReadLine (), it will read an
input stream from the console window and return the input string when user presses the
Enter Key. I have also used Clear (), it is used to delete content of screen and Convert.Tont32,
it converts predefined class which is a part of system base class library as well as method will
be converted given value to int type data.
Data types
Data Types is the classifiers that define data values and type of logical operations or
mathematical can be applied. I have used an integer is a data type to classify whole numbers
and string is a data type user to classify a text. Data types is important as it store variables
to let the program know the type of data that each variable will hold. For example, in my
program I have stored Date of Birth as integras because it is a date and it can be written as
whole numbers.
Access modifiers
Access modifier is used to specify the scope accessibility of a member of a class. I have used
access modifiers because I wanted to define who can and who cannot access to a certain
information in my program. Public (+) modifier has no restrictions and can be accessed by all
classes. However, Private (-) modifier code can on be accessible within the same class and
Protected (#) modifier code can be accessible within the same class, or in a class that is
inherited from that class.