You are on page 1of 3

THE UNIVERSITY OF DODOMA COLLEGE OF INFORMATICS AND VIRTUAL EDUCATION SCHOOL OF INFORMATICS

DEPARTMENT OF COMPUTER SCIENCE OBJECT ORIENTED PROGRAMMING IN JAVA

(CS 207)
ASSIGNMENT #01 Course; Students Name: Reg. No: B.Sc.CS TOBA SALEHE T/UDOM/2009/07941

Question; What are the differences between Object oriented programming language and structured programming language? The following are the differences between Object-oriented programming language and structured language Structured programming language Object oriented programming language(oop)
(i)- Program is divided into a number of submodules or functions or procedures Syntax is as follow;(i)- Program is organized by having a number of classes and objects. Its syntax is as follow;-

var var var function { ... } function { ... } function { ... }

--- Program Start object { var var function { ... } function { ... } function { ... } main { ... } } --- Program End var var function { ... } main { ... } --- Program end structures can have functions "in them" which Variables can be objects, which have their operate specificly on their own data. own data and functions.
(ii)-Views data and functions as twoseparate entities,two separate entities as a functions (iii) - Focus is on algorithm and control flow (ii)-Views data and function as a single entity Single entity is like object (iii)-Focus is on object model

Systems modeled in objects are easier to maintain and manipulate, because properties and methods can be altered for a class without affecting the rest of the system
(iv) -No designated receiver in the function call (iv)-There is a designated receiver for each message passing, this is because oop does not pass the name of the class as an argument to a program. (v)-Solution is problem-domain specific (vi)-Relationship between programmer and user isemphasized (vii)- Data is given importance (viii)-Helps in software reuse,

(v) -Solution is solution-domain specific (vi) -Relationship between programmer andprogram is emphasized (vii)- Algorithm is given importance (viii)-Software reuse is not possible

supports reuse of code: once developed, a class can be utilized as often as necessary.
(ix)-Maintenance is costly (x) - Top-down approach is followed Its followed in program designing (ix)-Maintenance is relatively cheaper (x)- Bottom-up approach is followed.

Mostly, bottom-up is followed in program design

References 1.addison-wesley effective java-programming language guid, 2.www.google.com/object oriented programming language 3.sun_educational service-sl-275-java programming student guid with instructor notes april 2000. 4.Java,beginners guid (Third Edition) by Herbert Schildt.

You might also like