Oop Assignment 1
Oop Assignment 1
ASSIGNMENT
THE IS QUESTIONS ARE:
Q2. Identify any 3 examples of object-oriented programming and procedural oriented programming
(CLO1-10 Marks)
Q3. Explain classes and objects with real-time examples? (CLO 1 - 20 Marks)
Q4. Class name is “Memo”. The object Reference name is “test1”. Write the code that creates an instance
of the class (CLO 2 - 10 Marks)
Q5. Write a java program with satisfying the following points. (CLO 3 - 50 Marks) a) Create the method
in java b) create the object in the main method. c) Call the method using the object.
Q1. Compare object-oriented programming with procedural-oriented programming?
Procedural programming uses a very detailed list of instructions to tell the computer what to do
step-by-step. In object-oriented programming, you organize your code by creating objects, and
then you can give those objects properties and you can make them do certain things.
1. C
2. C++
3. Java, etc.
1. C++
2. Java
3. Pascal, etc.
A Class is like an object constructor, or a "blueprint" for creating objects. An object is what comes
into reality.
For example: in real life, a car is an object. The car has attributes, such as weight and color, and
methods, such as drive and brake.
Q4. Class name is “Memo”. The object Reference name is “test1”. Write the code that creates an instance
of the class (CLO 2 - 10 Marks)
Q5. Write a java program with satisfying the following points. (CLO 3 - 50 Marks) a) Create the method
in java b) create the object in the main method. c) Call the method using the object.