Documente Academic
Documente Profesional
Documente Cultură
ASSIGNMENT
The first step in OOP is to define the objects you want to
manipulate and how they relate to each other called data
modeling
The next step is to define the data and logic associated by each
object, each distinct logic is known as a method
Object's interface consists of commands, each command
performing specific tasks. Objects communicate with each other
through defined interfaces called messages
The requesting(sending object) is referred to as the sender and
the receiving object is referred to as the receiver
Method; how do receiving objects interpret messages from the
senders? Each message has a code associated with it. When a
receiving object receives a message, code is executed. The code
that is associated with each message is called a method
Simula - the first oop language. others include;
Java;Python,C++,VB.Net;Ruby;Delphi
Program is a list of instructions that when executed causes the
computer to behave in a predetermined manner
The three main characteristics of OOP are encapsulation,
inheritance, and polymorphism.
Data structure
This is a particular way of storing and organizing data in a
computer so that it can be used efficiently.
Data structures are used in almost every program or software
system. Different data structures are suited for different kinds of
applications.
Any data structure which organizes the data elements one after
the other is a linear data structure
Examples of linear data structures include;
List; ordered list keep items in a specific order such as
alphabetical or numerical. Whenever an item is added to the list,
it is placed in the correct sorted position so that the entire list is
always sorted.
Stacks; this emulates a "last-in-first-out" or lifo. Entry is only
allowed from one end.(operations restricted to one end). The last
item to enter the stack is the first to leave the stack; involves
push and pop. (pushing means adding an item to the stack while
pop means removes an item from the stack)
Queues; this data structure allows items to be added at one end
of the list and removed at the other end.
Non-linear data structures
Examples; tree, multidimensional arrays, graphs
Tree;
Data types
Primitive
Composite
Abstract