0% found this document useful (0 votes)
353 views

Oop Assignment 1

This document contains an assignment for an Object Oriented Programming course, with 5 questions asking students to compare procedural and object-oriented programming, provide examples of each, explain classes and objects with a real-world example, write code to create an instance of a Memo class, and write a Java program with a method, object creation, and calling the method. The questions are answered explaining the differences between procedural and object-oriented programming, providing programming language examples for each, using a car as an example class and object, and including code samples to meet the requirements.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
353 views

Oop Assignment 1

This document contains an assignment for an Object Oriented Programming course, with 5 questions asking students to compare procedural and object-oriented programming, provide examples of each, explain classes and objects with a real-world example, write code to create an instance of a Memo class, and write a Java program with a method, object creation, and calling the method. The questions are answered explaining the differences between procedural and object-oriented programming, providing programming language examples for each, using a car as an example class and object, and including code samples to meet the requirements.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

SCHOOL OF COMPUTING & INFORMATICS

Course Title: Object Oriented Programming


Course Code: CCC1223
Lecturer Name: DR RISKHAN BASHEER
Student Name: Yusuf Magaji Badau
STUDENT ID: AIU21102262
______________________________________________________________________

ASSIGNMENT
THE IS QUESTIONS ARE:

Q1. Compare object-oriented programming with procedural-oriented programming? (CLO1 - 10 Marks)

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.

Q2. Identify any 3 examples of object-oriented programming and procedural-oriented


programming?

This are the example of object-oriented programming

1. C
2. C++
3. Java, etc.

This for procedural programming are

1. C++
2. Java
3. Pascal, etc.

Q3. Explain classes and objects with real-time examples?

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.

You might also like