New folder/IMAG2318.jpg
New folder/IMAG2319.jpg
New folder/IMAG2320.jpg
New folder/IMAG2321.jpg
Task 1.
1. Use case is a type of tool that is used for analyzing systems in order to identify, organize and clarify systems and their requirements. A use case diagram will thus be defined as a graphical presentation of the elements of a system and how these elements interact in performing the required objectives.
Use case has two types of actors:
Primary actors. These are the ones that the system shall provide services to. They include customers.
Secondary actors are those that manage the system in providing services to the customers, and they include system administrators.
2. <<include>> relationship is used in extraction of use case duplicated use case fragments in multiple use cases. An example is where a user accesses the ATM. The first step is pin, which then grants them access to main menu.
<<extend>> relationship applies where a conditional step is to be added to another use case step that is first class, and is not necessarily a step requirement. An example is when a user in an ATM wants to monitor their accounts. Once the main menu is provided, he or she would be able to monitor the balance, and another option of withdrawing would be an extension or addition to the base use class.
3. Encapsulation is the process of combining data and functions of a program into one component. It is used in protecting codes and data from being accessed randomly by other codes that are defined outside the class. An example in java is where getters and setters are used by the public methods in order to access class fields from outside the java.
Information hiding is the process of differentiating design functions and decisions in a computer program which are vulnerable to change, from modification by other programs. An example is where a programmer decides to create an application for managing a database. The programmer retains the information to modify the program while only releasing the part of the program used to access basic database functions to the public.
Polymorphism refers to the use of one interface to access various entities of different types. An example of polymorphism is where various data types are defined for a particular function, and the computation or data modification done using the best data type method among those defined.
Data abstraction is a methodology used in defining the methods of interaction with the system, starting from easiest tending to the most complex interaction method, with the very difficult ones suppressed. An example is where a programmer inputs data for coding, all the data input is basically plain, and the complex part of data representation by the code is not portrayed on the screen for the programmer.
4. Difference between USDP and Waterfall life Cycles.
In USDP, the stages followed from analysis to testing, are conducted in iterative and concurrent manner while in Waterfall, these processes are done in sequ.
New folderIMAG2318.jpgNew folderIMAG2319.jpgNew folder.docx
1. New folder/IMAG2318.jpg
New folder/IMAG2319.jpg
New folder/IMAG2320.jpg
New folder/IMAG2321.jpg
Task 1.
1. Use case is a type of tool that is used for analyzing systems
in order to identify, organize and clarify systems and their
requirements. A use case diagram will thus be defined as a
graphical presentation of the elements of a system and how
these elements interact in performing the required objectives.
Use case has two types of actors:
Primary actors. These are the ones that the system shall provide
services to. They include customers.
Secondary actors are those that manage the system in providing
services to the customers, and they include system
administrators.
2. <<include>> relationship is used in extraction of use case
duplicated use case fragments in multiple use cases. An example
is where a user accesses the ATM. The first step is pin, which
then grants them access to main menu.
<<extend>> relationship applies where a conditional step is to
be added to another use case step that is first class, and is not
necessarily a step requirement. An example is when a user in an
ATM wants to monitor their accounts. Once the main menu is
provided, he or she would be able to monitor the balance, and
another option of withdrawing would be an extension or
addition to the base use class.
3. Encapsulation is the process of combining data and functions
of a program into one component. It is used in protecting codes
2. and data from being accessed randomly by other codes that are
defined outside the class. An example in java is where getters
and setters are used by the public methods in order to access
class fields from outside the java.
Information hiding is the process of differentiating design
functions and decisions in a computer program which are
vulnerable to change, from modification by other programs. An
example is where a programmer decides to create an application
for managing a database. The programmer retains the
information to modify the program while only releasing the part
of the program used to access basic database functions to the
public.
Polymorphism refers to the use of one interface to access
various entities of different types. An example of polymorphism
is where various data types are defined for a particular function,
and the computation or data modification done using the best
data type method among those defined.
Data abstraction is a methodology used in defining the methods
of interaction with the system, starting from easiest tending to
the most complex interaction method, with the very difficult
ones suppressed. An example is where a programmer inputs data
for coding, all the data input is basically plain, and the complex
part of data representation by the code is not portrayed on the
screen for the programmer.
4. Difference between USDP and Waterfall life Cycles.
In USDP, the stages followed from analysis to testing, are
conducted in iterative and concurrent manner while in
Waterfall, these processes are done in sequential manner.
Waterfall lifecycle uses a general budget requirement for
development, whereas USDP considers each phase budget
requirements.
5. Class diagrams are the various building blocks used in
constructing the structure of a system that shall fully describe
the system in terms of attributes, system classes, methods of
operation, and object relationships.
Steps involved in constructing class diagrams in use case
3. Identify the problem and the required inputs. This determines
the output of the system and its objective targets to be met.
Formulate questions regarding the inputs. Here, the output
layout is considered in order to determine the kind of input
format to use.
Analysis. In this case, a research on the types of classes and
attributes to use are identified. Best working relationships are
identified for use later on.
Class diagrams consolidation. The general view of the working
of system is integrated within this diagram.
Verification of the class diagrams. This determines the
correctness and accuracy of the class diagrams for the UC
designed.
Task 2.
Question 1.
Use cases refer to steps between users interacting with systems
in order to achieve a specific objective.
Use case descriptions for:
Start line run.
A supervisor determines the type of production type as per the
schedule prescribed by the production planners. Then, the
amount of ingredients required and their availability and
quantity in warehouse. Afterwards, the supervisor records the
number of staff allocated to the run line, and the number of
operative staffs available before the line is run. Once all these
have been determined, the supervisor switches on the line, and
performs troubleshooting options to determine the workability
of the line first. Al recording of ingredients used and the start
time into a production sheet.
Record Employee Joining the line
For an employee who is appearing for the first time during the
week, a new timesheet is produced for the worker. For those
who have been working throughout the week, the job card
provides details which are then copied to the production sheet
4. and the timesheet.
Record employee leaving the line
The time of departure is recorded on a rough note, and the
duration they spend missing. In cases of sick leaves or
disappearances, the information is recorded in production sheet
in case the duration spent is more than 15 minutes. Furthermore,
a replacement is made immediately.
Stop line
A record finishing time is made on the production sheet. A
supervisor from production control is called to verify the
quantity produced before being recorded in the production
record sheet. The supervisor then records all absentees and their
total hours of work for each operative. Unused ingredients are
then returned to the warehouse as the line is cleaned for the
next run.
Question2: Communication Diagrams
Start Line Run
1.1. getStaffpresent()
1.2. getNumber()
2.1.1. getInfo()
2.1.1.1. getStatus()
Run line
1.3. getIngredients()
1.4. getQuantity()
2.1. getInfo()
2.2. getRuntype()
5. Staff
Warehouse
1. getInfo()
2. getStatus()
Line Switch
Production Line
Supervisor
Record Employee Joining Line
1.1. getName()
1.2. getJobNo()
1.3. getTime()
1.4. geteDate()
First time Employee
2.1. getInfo()
2.2. getRuntype()
6. Employee
1.5. getJobcard()
1.6. getJobNo()
1. getInfo()
2. getStatus()
2.1.1 getTime()
Timesheet
Continuing Employee
Supervisor
Record Employee Leaving a line
4.1 getJobcard()
3.1 getTime()
3.2 getArrival()
Missing
7. 4.3 getInfo()
Employee
1. getInfo()
2. getStatus()
3. getTime()
4. getDescription()
4.3.1. getStatus()
Production Record Sheet
Sick
Supervisor
4.1 getJobcard()
4.2 getName
3.3 getDate()
Stop line
3.1.1 getStatus()
Stop Line
8. 3.1 getQuantity()
1. getInfo()
2. getTime()
3. getQuantity()
Production Advisor
Supervisor
Production Line
3.1 getUnusedIngredients()
2.1 getTotaltime()
Warehouse
Timesheet
3.1 getTotalhours()
1.2 getTotalAbsentees()
Production Record sheet
2.1.1. getInfo()
9. Class Diagram
Stop Line
Time
Production Supervisor
Quantity
Remaining Quantity
Production Sheet
Job no
Total Quantity
Total Hours
Remaining Quantity
Employee Leaving
Departure Time
Reason
Worker Joining
Name
Job tag
Time in
Time Sheet
Time Start
Time End
Time Leave
Start Run
Employees
Ingredients quantity
Production Site
Line number
Quantity
Operatives
Job No
Name
Date
Line Number
Supervisors
10. Name
Tag No
Line detail
References:
Applying UML and patterns
Craig Larman
Patterns in Java, volume 2
Mark Grand
What are patterns?
Principles and solutions codified in a structured format
describing a problem and a solutionA named problem/solution
pair that can be applied in new contextsIt is advice from
previous designers to help designers in new situations
The idea behind design patterns is simple:
Write down and catalog common interactions between objects
that programmers have frequently found useful.
Result:
Facilitate reuse of object-oriented code between projects and
between programmers.
Some definitions of design patterns“Design patterns constitute a
11. set of rules describing how to accomplish
certain tasks in the realm of software development.” (Pree,
1994)“Design patterns focus more on reuse of recurring
architectural design
themes, while frameworks focus on detailed design… and
implementation.” (Coplien & Schmidt, 1995).“A pattern
addresses a recurring design problem that arises in specific
design situations and presents a solution to it” (Buschmann, et.
al. 1996)“Patterns identify and specify abstractions that are
above the level of
single classes and instances, or of components.” (Gamma, et al.,
1993)
Characteristics of Good patternsIt solves a problemIt is a
proven conceptThe solution isn't obviousIt describes a
relationshipThe pattern has a significant human component
It solves a problem: Patterns capture solutions, not just abstract
principles or strategies. It is a proven concept: Patterns capture
solutions with a track record, not theories or speculation. The
solution isn't obvious: Many problem-solving techniques (such
as software design paradigms or methods) try to derive
solutions from first principles. The best patterns generate a
solution to a problem indirectly -- a necessary approach for the
most difficult problems of design. It describes a relationship:
Patterns don't just describe modules, but describe deeper system
structures and mechanisms. The pattern has a significant human
component .... All software serves human comfort or quality of
life; the best patterns explicitly appeal to aesthetics and utility.
Types of patterns
12. Architectural Patterns
Expresses a fundamental structural organization or schema for
software systems.
Design Patterns
Provides a scheme for refining the subsystems or components of
a software system, or the relationships between them.
Idioms
An idiom describes how to implement particular aspects of
components or the relationships between them using the features
of the given language.
Architectural Patterns
An architectural pattern expresses a fundamental structural
organization or schema for software systems. It provides a set
of predefined subsystems, specifies their responsibilities, and
includes rules and guidelines for organizing the relationships
between them.
Design Patterns
A design pattern provides a scheme for refining the subsystems
or components of a software system, or the relationships
between them. It describes commonly recurring structure of
communicating components that solves a general design
problem within a particular context.
Idioms
An idiom is a low-level pattern specific to a programming
language. An idiom describes how to implement particular
aspects of components or the relationships between them using
the features of the given language.
Describing patterns
Name :It must have a meaningful name.
Problem: A statement of the problem.
Context: This tells us the pattern's applicability.
13. Forces: A description of the relevant forces and constraints and
how they interact/conflict with one another..
Solution
: Static relationships and dynamic rules describing how to
realize the desired outcome.
Consequences: Implications( good and bad) of using the
solution.
Examples: One or more sample applications of the pattern .
Name
It must have a meaningful name. This allows us to use a single
word or short phrase to refer to the pattern, and the knowledge
and structure it describes. It would be very unwieldy to have to
describe or even summarize the pattern every time we used it in
a discussion. Good pattern names form a vocabulary for
discussing conceptual abstractions. Sometimes a pattern may
have more than one commonly used or recognizable name in the
literature. In this case it is common practice to document these
nicknames or synonyms under the heading of Aliases or Also
Known As. Some pattern forms also provide a classification of
14. the pattern in addition to its name.
Problem
A statement of the problem which describes its intent: the goals
and objectives it wants to reach within the given context and
forces. Often the forces oppose these objectives as well as each
other (one might think of this as a "wicked problem"
reminiscent of DeGrace and Stahl, in their book Wicked
Problems, Righteous