object modelling 2

profilealisgh
assignment_shiko-1.docx

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 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

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 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()

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()

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

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

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()

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

Name

Tag No

Line detail