Question

In: Computer Science

What is different between procedural and object-oriented programming? Match each of the following OOP concepts with...

What is different between procedural and object-oriented programming?

Match each of the following OOP concepts with its example/description.

Question 2 options:

12345678

Providing a way for an entity to behave in several ways OR providing multiple entities to be treated in a similar way

12345678

A key way of saving having to retype a lot of code for similar but different objects

12345678

The removal of non-essential information

12345678

Allowing which function to be called by an object to be set at runtime instead of when the program is compiled

12345678

Data and functions together as defined by a blueprint and then instantiated with particular values

12345678

When objects communicate with each other they are doing this

12345678

The concept of putting data and functions together in a single form

12345678

Preventing outside code from accessing data that it shouldn't

1.

Class and Object

2.

Encapsulation

3.

Abstraction

4.

Data Hiding

5.

Polymorphism

6.

Inheritance

7.

Dynamic Binding

8.

Message Passing

Match each step/characteristic of OOA/OOD/OOP with its description.

Question 3 options:

123

During this step in the process, objects are identified and organized

123

During this process the programmer tries to understand the goals of the application

123

In this step, the program is implemented

123

During this step in the process a plan is devised in how an application's purpose will be met by laying out some of the implementation details

123

During this phase the code is tested

1.

Object Oriented Analysis

2.

Object Oriented Design

3.

Object Oriented Programming

Solutions

Expert Solution

1)

procedural programming is Structure oriented

object-oriented programming is Object oriented

2)

In procedural programming ,entire program is divided into small parts which is based on the functions.

In object-oriented programming the entire program is divided into small parts called objects

3)

In procedural programming no access specifier is observed

In object-oriented programming there are three access specifiers which are called

i) Public,

ii) Private and

iii) Protected

4)

In procedural programming there is no data hiding hence it is less secure

In object-oriented programming there is data hiding hence it is more secure

5)

In procedural programming the approach is top down approach

In object-oriented programming the approach is Bottom-up approach

--------------------------------------------------------------------------------------------------

Providing a way for an entity to behave in several ways OR providing multiple entities to be treated in a similar way

-- Polymorphism

A key way of saving having to retype a lot of code for similar but different objects -- Inheritance

The removal of non-essential information -- abstraction

Allowing which function to be called by an object to be set at runtime instead of when the program is compiled -- Dynamic Binding

Data and functions together as defined by a blueprint and then instantiated with particular values -- Class and Object

When objects communicate with each other they are doing this -- Message Passing

The concept of putting data and functions together in a single form -- Encapsulation

Preventing outside code from accessing data that it shouldn't -- Data Hiding

------------------------------------------------------------------------------------------------------------------------

During this step in the process, objects are identified and organized -- Object Oriented Analysis

In this step, the program is implemented -- Object Oriented Programming

During this step in the process a plan is devised in how an application's purpose will be met by laying out some of the implementation details -- Object Oriented Design


Related Solutions

What are the object oriented concepts and which all object oriented concepts are used in the...
What are the object oriented concepts and which all object oriented concepts are used in the given program? Consider the following code and explain how each of the object oriented concepts are applied in the given program. (CO1) class Vehicle { string brand; public: void honk(); void honk(int); }; void Vehicle::honk() { cout << "Tuut, tuut! \n" ; } void Vehicle::honk(int x) { for(int i=0;i<x;i++) cout << "Tuut, tuut! \n" ; } int main() { Vehicle V1; V1.honk(); V1.honk(3); }
(a) Explain at least TWO (2) major aspects of an object-oriented programming (OOP). Provide suitable examples,
(a) Explain at least TWO (2) major aspects of an object-oriented programming (OOP). Provide suitable examples,
-What is object-oriented programming? -What is a class? -What is an object? -A contractor uses a...
-What is object-oriented programming? -What is a class? -What is an object? -A contractor uses a blueprint to build a set of identical houses. Are classes analogous to the blueprint or the houses? Explain. -What is a class diagram? How is it used in object-oriented programming? -What is an attribute in OOP? What is a data member? -What is a method in OOP? What is a member function? -What is the difference between private members and public members of a...
Explain what classes and objects are in object - oriented programming. Give an example of each...
Explain what classes and objects are in object - oriented programming. Give an example of each and explain how they work together in a computer program.
We now begin learningconcept in modern programming - Object Orientation Programming (OOP). Let's write our first...
We now begin learningconcept in modern programming - Object Orientation Programming (OOP). Let's write our first Class definition, and then instantiate an object of this Class to run in a test application to test our objects behaviors. Employee.java - Make an Employee Class, code to the design of the UML diagram -name: String -employeeId: int -Shift: Boolean -HourlyPay: double +Employee() +setName(n: String) +setemployeeId(i:int) +setShift(s:Boolean) +setHourlyPay(p:double) +getname() : String +getemployeeId() : int +getShift() : Boolean +getHourlyPay() : double +calculateOvertimePay( hours :...
When should you use and object-oriented language over a procedural language and vice versa?
When should you use and object-oriented language over a procedural language and vice versa?
Research and explain in your words what is known as Object Oriented Programming. Then, identify two...
Research and explain in your words what is known as Object Oriented Programming. Then, identify two advantages of OOP for application development. In peer replies, choose from one of the following and define the concept as part of your response. Abstraction. Encapsulation. Inheritance. Polymorphism.
1. In Object Oriented Programming The private object fields can be directly manipulated by outside entities....
1. In Object Oriented Programming The private object fields can be directly manipulated by outside entities. Group of answer choices A. True B. False 2. __________ programming is centered on the procedures or actions that take place in a program. Group of answer choices A. Class B. Object-oriented C. Menu-driven D. Procedural/ Structural 3. __________ programming encapsulates data and functions in an object. Group of answer choices A. Object-oriented B. Class C. Menu-driven D. Procedural 4. The data in an...
Use composition relationship. What is composition? You will find out what composition in object oriented programming....
Use composition relationship. What is composition? You will find out what composition in object oriented programming. Based on the bedroom package below please create your own classroom package. After completing entire package, you will write about your package specification in Readme.txt and also explain how you apply composition to your project. package Bedroom; public class Bedroom { private String name; private Wall wall1; private Wall wall2; private Wall wall3; private Wall wall4; private Ceiling ceiling; private Bed bed; private Lamp...
Use composition relationship. What is composition? You will find out what composition in object oriented programming....
Use composition relationship. What is composition? You will find out what composition in object oriented programming. Based on the bedroom package below please create your own classroom package. After completing entire package, you will write about your package specification in Readme.txt and also explain how you apply composition to your project. package Bedroom; public class Bedroom { private String name; private Wall wall1; private Wall wall2; private Wall wall3; private Wall wall4; private Ceiling ceiling; private Bed bed; private Lamp...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT