Wajuzi wa programming languages msaada

Wajuzi wa programming languages msaada

IrDA

JF-Expert Member
Joined
Aug 26, 2010
Posts
745
Reaction score
361
Wadau naombeni mnisaidie mifano ya programming languages zinazoangukia katika makundi yafuatayo
1. 1.EVENT DRIVEN LANGUAGES

2. 2. OBJECT ORIENTED LANGUAGES

3. 3. STRUCTURAL ORIENTED LANGUAGES

Nimejaribu kugoogle lakini siajapata data za kutosha hasahasa katika EVENT DRIVEN LANGUAGES
 
Sidhani kama kuna kitu kama event driven language, kuna event driven programming. Karibia kila language inaweza kufanya hili, kama kwenye Vb au C# unapotengeneza Button kisha button ikabonyezwa hili linasababisha On Click event (tukio) same kwenye Java au Javascript. Kutokana na tukio hili unaweza kufanya kitu fulani. So search event driven programming.
 
Jibu alilotoa Kang ni sahihi kuhusu event driven programming. A simple explanation would be to contrast it with structured programming. A structured program is used to mean a program executing from the start line by line following a certain order. The execution happens sequentially.

On the other hand event driven programming execution does not flow from top to bottom. An event (sometimes called transaction or action) triggered by external or internal entity will change the flow of execution.

OOP is a concept of looking or writing a programming code to reflect object behaviours and actions. Your focus is on the data as opposed to structured programming where the focus is on the task. This means that when following OOP you will need to define the data to identify their types, attributes and behaviour. Take for example you need to write program to run a 'dog robot' and a 'cat robot'. Your first concern will be to define what dog is and what a cat is. In you definition you will realise that dog and cat share some common aspects(e.g they are both animal with four leg). However you will also find things that they dont share (e.g. a dog barks while a cat meow/yowl). Their similarity and distictions are very important when buiding the programming block for the cat and dog robots in OOP. This is where concepts such as objects, classes, polymorphism, inheritance, etc come into play.

If you were to design the same program in a structered programming you would define only the operations to get the robots walk, make noise, eat, etc. These are sometimes called functions.

Now you can clearly see that with structured programming the program is easy to design but rigid, difficult to change or reuse in the long run.

On the other hand OOP may seem complicated to design initially but easy to manage, flexible and reusable. Just think, this data if defined properly you may easily design cow robot, horse robot etc only by observing abstract and interface classes with the concept of inheritance.

I hope this will be helpful with your questions. If you need to understand this better you can email me: goodymboya@gmail.com
 
EVENT DRIVEN PROGRAMMING ni kama alivyosema Kang, napenda kuchangia kidogo kwenye Object Oriented Programming(OOP) Ninavyofaham mimi OOP kuhusu ni kwamba OOP inagawanya INSTRUCTION/CODES katika vipengele vidogovidogo ambavyo ni rahisi kwa programmer kuvifanyia kazi kuliko ilivyo katika non-OOPs ambapo instuction zinaandikwa kuanzia mwanzo hadi mwisho bila kuwepo kwa classes. Mfano wa programming language ambazo ni OOP ni nyingi sana kama vile VB.net,VC++,VC#,Perl,VisualProlog,,Python n.k

Mfano wa OOP katika VisualBasic.net
Katika VB.net kila event huwa independet lakini global katika program nzima na huandikwa hivi:

Public Classes

VB.net instruction codes zinaandikwa humu kati ya Public Class na End Class

End Class

Kwa hiyo code zote vb zinatengwa na kuandikwa kati ya Public Class na End Class. Class zinakua nyingi kulingana na events pamoja na objects

Sory lengo sio kufundisha VB najaribu kutoa tu mfano wa OOP

Programming language - Wikipedia, the free encyclopedia

Object-oriented programming - Wikipedia, the free encyclopedia
 
Back
Top Bottom