Explain, compare and contrast Procedural Programming with Object Oriented Programming concepts. Provide examples.
Procedure Oriented Programming -POP
Object Oriented Programming -OOP
1
In POP, program is divided into small parts called functions.
In OOP, program is divided into parts called objects.
2
In POP,Importance is not given to data but to functions as well as sequence of actions to be done.
In OOP, Importance is given to the data rather than procedures or functions because it works as a real world.
3
POP follows Top Down approach.
OOP follows Bottom Up approach.
Explanation
Top down approach and bottom up approach are involved in software development. These approaches are not involved in program execution.
Top down approach begins with high level design and ends with low level design or development. Whereas, bottom up approach begins with low level design or development and ends with high level design.
4
POP does not have any access specifier.
OOP has access specifiers named Public, Private, Protected, etc.
Example:
class Sample{
private String school=null;
public String surName=null;
protected String name=null;
}
5
In POP, Data can move freely from function to function in the system.
In OOP, objects can move and communicate with each other through member functions.
6
In POP, Most function uses Global data for sharing that can be accessed freely from function to function in the system.
In OOP, data can not move easily from function to function,it can be kept public or private so we can control the access of data.
7
POP does not have any proper way for hiding data so it is less secure.
OOP provides Data Hiding so provides more security.
Example:
class Sample{
private String name;
}
Here we declare name as private variable which means it is accessble in this particular class only,and not accessble from any where.
8
In POP, Overloading is not possible.
In OOP, overloading is possible in the form of Function Overloading and Operator Overloading.
Explanation:
Method Overloading is a feature that allows a class to have two or more methods having same name, if their argument lists are different.
class DisplayOverloading { public void disp(char c) { System.out.println(c); } public void disp(char c, int num) { System.out.println(c + " "+num); } }
here we have two methods with same names and with different parameters.
9
Example of POP are : C, VB, FORTRAN, Pascal.
Example of OOP are : C++, JAVA, VB.NET, C#.NET.
Explain, compare and contrast Procedural Programming with Object Oriented Programming concepts. Provide examples.
What are the differences between the traditional program paradigm (procedural programming) and the newer object oriented paradigm? What are the advantages and disadvantages of each? Which paradigm would you prefer to work with? Explain and give your reasons.
Briefly explain the terms used in object-oriented programming with examples. NO COPY AND PASTE PLEASE USE UR OWN WORDS
In unit 5 we introduce some of the most important concepts in object oriented programming including class, object, method, attributes, and instantiation. Discuss each of these concepts and how they relate to each other and provide a practical example drawn from your own personal experience.
Many programmers think that object-oriented programming is a superior approach to procedural programming. Others think it adds a level of complexity that is not needed in many scenarios. Find and summarize arguments on both sides of this issue. With which side do you agree? Why? Be thorough and detailed with your answers. Write at least two FULL PARAGRAPHS and be sure to CITE your sources (using MLA or APA format). "Summarize" here means to state in your own words--do not copy and paste the words of others. You must...
Explain both object-oriented programming and structured programming. Following your explanation of these programming methods, describe the various advantages and disadvantages of each method. Lastly, provide a justification of which method you prefer and why.
Question 1 (20 marks) (a) Explain at least TWO (2) major aspects of an object-oriented programming (OOP). Provide suitable examples, where necessary. [10 marks] (b) Describe TWO (2) advantages of OOP. [10 marks]
Explain the following object-oriented(OO) concepts with the aid of code examples (either C++ or Java): Inheritance Over-riding . Over-loading Describe any differences between C++ and Java in how these OO concepts are implemented? 3(c) 17 Marks] Describe C++ namespaces using a code example. Describe Java packages, again using a code example. How do C++ namespaces compare to Java packages? 3(d) [5 Marks] What are inline methods in C++/Java? Explain the terms accessor and mutator. Explain the following object-oriented(OO) concepts with...
1. Compare and contrast anticipatory and response-based business models. (explain in detail and provide examples) 1.1) Why has responsiveness become popular in supply chain collaborations? 3. What is Reverse Logistics? Discuss how reverse logistics can create value in the Supply Chain?- Provide 3 examples and explain in detail.
PlLEASE HELP !! Python II final project. Object Oriented Programming python.Make a program using OOP concepts. Anything will work as long as it runs in idle.
Compare and contrast the file-oriented approach and the database approach. Explain the main advantages of database systems.