Sie sind auf Seite 1von 6

START

X>0

PRINT X

WAYS USED TO WRITE AN ALGORITHM


1. STRUCTURAL ENGLISH: It is a subset of standard English that describes logical process clearly.

Guidelines for using structural English


 Use one of the three blocks learnt i.e Sequence, Loop or Selection.
 Use Indentation.
 You comment.
 Use a limited vocabulary including standard terms in the data dictionary and specific words that
describe the process rule.

2. Decision Table: A decision table is a logical structure that shows every combination of
conditions and outcome.
Decision Table with one condition: If a process has a single condition i.e Yes or No
Decision Table with two conditions: If the process description contains two conditions,
products in stock status and customer credit status. If both conditions are met, the order is
accepted, otherwise the order is rejected. An order will be accepted if the product in stock and
the customer credit status is okay, else all order will be rejected.

Product in stock X Credit status Y X and Y


0 0 0
0 1 0
1 0 0
1 1 1

3. Decision Tree: A decision tree is a graphical representation of the condition, action, and rules
found in a decision table. A decision tree shows the logic structure in a horizontal form that
resembles a tree with the roots at the left and the branches at the right.
OBJECT MODELING

LEARNING OBJECTIVES:

 Explain how OOA can be used to describe an information system


 Define object modeling, terms and concept including
 Explain relationship among objects and the concept of inheritance
 Draw an object relationship diagram
 Describe UNL (unified modeling language) techniques

INTRODUCTION

This chapter describe OOA which is another way to view and model system requirements. This chapter
illustrates the use of OOO techniques to document, to analyze and model information system

OVERVIEW OF OOA

OOA describes an information system by identifying objects. An object can be a real person, a place, an
event or a transaction. The end product of OOA is the object model which represents an information
system in terms of object an OO concept

OO TERMS AND CONCEPT

An object represents something that is significant to an IS.

In DFD, data and processes are created separately.

In OO, data and process are combined into an Object.

An attribute characterize an object.

An object also has methods which are tasks or functions that the object performs when it receives a
message or a command to do so.

A class is a group of objects of the same similarity

EXAMPLE: Toyota Carina is an object of Personal cars class.

An instance is a specific member of a class

OBJECTS
STUDENT
Age
Gender
Phone number
Register
Pass
fail
Student: Breezy
20
attrib Male
utes 654209474
Registered
Passed
method

ATTRIBUTES

System analysts design an object attribute during the design process. Object can inherit or aquire
attributes from others. Objects can have a special attribute called a state. The state of an object is an
adjective describing the object’s current state. Ex A person can be a future student, a current student or
a passed student.

METHOD

A method defines a specific task that an object can perform. Just as objects are similar to nouns,
attributes are similar to adjectives, method resembles verbs that describes what and how an object does
something.

Example: Method in cooking Food(Spaghetti)

1. Make the spaghetti available


2. Turn on the gas cooker
3. Put an empty pot on the gas cooker
4. Pour water in the pot
5. Allow for 2 mins
6. Put the spaghetti inside
7. Put salt
8. Allow for about 7 to 10 mins to get ready (soft)
9. When ready, remove the pot from the fire
10. Drain the water from the spaghetti
11. Pour cold water and drain to prevent it from sticking
12. Prepare necessary spices : pepper, green spices, onion, tomatoes, carrot and green beans etc
13. Put another pot on fire ,pour groundnut oil inside to it
14. Put the spices in and fry for about 2 mins
15. Add the spaghetti to the fried spices and allow to cook for 5 mins
16. When ready, serve the cooked spaghetti hot

MESSAGE

A message is a command that an object receives to perform a task Ex. “RegisterForExams” directs the
students to register for exams.

The student class understands the message and executes the method. The same message can be sent to
different objects that can produce different results, this is called Polymorphism.

The concept that a message gives different meaning to different objects is called Polymorphism.

An object can be viewed as a black box because a message to the object triggers changes within the
object without specifying how the changes must be carried out.

The black box concept is an example of Encapsulation which means that all the data and methods are
self contained. Encapsulation allows objects to be used as modular components anywhere in the system
because objects can send and receive messages but do not change the internal method of the object.

OO design are implemented using OO programming

ADVANTAGES

1. Saves time when implementing


2. Modular objects: can translate design into code easily
3. You can use modular programming

CLASSES

Objects belong to a group or category called a class. All objects within a class share common attributes
and methods, so a class is a blueprint or template for all objects within the class. Objects grouped
together within a class can be called Sub-class with specific Sub-classes which are specific category
within the class.

RELATIONSHIP BETWEEN OBJECTS AND CLASSES

Das könnte Ihnen auch gefallen