11

COM 1013 chptr 7. structure n objected programming

Embed Size (px)

DESCRIPTION

:)

Citation preview

Page 1: COM 1013 chptr 7. structure n objected programming
Page 2: COM 1013 chptr 7. structure n objected programming

STRUCTURED

Page 3: COM 1013 chptr 7. structure n objected programming

STURUCTURED PROGRAMMINGEnvolved in the 1970s. The name refers to the practice of building programs out of small modules which were easy to read and understand. Each modules had a single entrance and exit, and performed a single task.

Structured programming practices can be use with any programming languages.

Prior coding techniques resulted in “spaghetti code”. That was nearlly imposibble to read, understand and maintain

Page 4: COM 1013 chptr 7. structure n objected programming

Cont’Software developer have found that structured programming results in improves efficiency, but they continue to struggle with the process of building software quickly and correctly.

Reuse is recognise as the best solutions, which is allows programms to be built quickly and correctly

1980s, computing took another leap forward with the development of object-oriented programming (OOP)

Page 5: COM 1013 chptr 7. structure n objected programming

The building of OOP, called object as reuseable, modular components

OOP builidings on and enchances program structured

Object are components of structured programs and the logic of maltipulating is are also structured

Page 6: COM 1013 chptr 7. structure n objected programming

Selections structures are built around special program flow constructs called conditional statements. A conditional statements are simply test that determines what program will do next.

When the program makes a decisions using a conditional statements, the program flow can often go in one of two differetions depending on the outcomes of the decision(different sequences of code are called branches.

Page 7: COM 1013 chptr 7. structure n objected programming

OBJECT – ORIENTED PROGRAMMING

Page 8: COM 1013 chptr 7. structure n objected programming

Object – oriented programming (OOP)

Concepts of OOP, such as objects and classes , can seem abstract at first, but many

programmers claim that an object orientation is a natural way of thinking about the world

Because OOP gives them an intuitive way to model the world, they say, programs become simple, programming become faster, and the burden of program maintenance is lessened.

Page 9: COM 1013 chptr 7. structure n objected programming

Three important concepts OOP

Encapsulation. Means a object contains data

and the instruction for processing it

Inberitance. Each class

contains specific instructions

(methods) that a unique to that

group

Polymorphrism. Means many

shapes . Messages

(generalized request)

produced different result

Page 10: COM 1013 chptr 7. structure n objected programming

Class:boatattributes:lenght

locationmethods move

change direction

Subclass:sailboatattributes: number

of mastsmethods: raise sail

lower sail

Subclass:powerboatattributes: engine

sizefuel capacity

methods refuel

Subclass:canaoattributes: number

of seats

Page 11: COM 1013 chptr 7. structure n objected programming

Thank you for attention and listening...

Have any question???