TPL1
TPL1
TPL1
2. Object-Oriented Programming(00):
In this framework, all real-world entities are represented by Classes. Objects are instances of classes
so each object encapsulates a state and behaviour. State implies the fields, attributes of the object
and behaviour is what you do with the state of the object and they are the methods. Objects interact
with each other by passing messages.
3. Logical Programming
Logical programming is a computer programming paradigm that has its foundations in mathematical
logic in which program statements express facts and rules about problems within a system.
Rules are written as logical clauses with a head and a body. They also follow a declarative rather than
an imperative approach. However, what does that mean?
To understand how a problem can be solved in logical programming, you need to know about the
building blocks - Facts and Rules -
Let us understand the difference between Imperative and declarative programming.
Imagine you walk into your favourite coffee place and you would like to order some coffee.
The imperative approach will be:
Enter the coffee shop
. Queue in the line and wait for the barista asking you for your order
. Order
. Yes, for takeaway, please
• Pay
. Present your loyalty card to collect points
. Take your order and walk away