Object Oriented Question
Object Oriented Question
Cognitive
Course No.
Creation/Synthesis
General Specific objectives of
Understanding
Name
Remembering
objective/Competency /learning outcomes items
Application
Evaluation
Analysis
Students will be 3 3
able to explain the
basic object-
oriented concepts
OOP Develop the necessary
in Java skills in designing, Students will be 2 2
coding, debugging, and able to identify the
documenting large differences
programs using Java between structural
programming languages and object-oriented
programming
paradigms
Students will be 3 3
able to use java
programming
language to code,
debug and execute
results
The statement "Students will be able to explain the basic object-oriented concepts" is
a learning outcome that falls under the Comprehension level of the cognitive domain.
Comprehension (understanding) refers to the ability to understand the meaning of
information, and in this case, students are expected to understand the basic concepts of object-
oriented programming.
To achieve this learning outcome, students should be able to understand and explain the
following basic object-oriented concepts:
1. Classes and Objects: Students should understand the difference between classes and
objects. A class is a blueprint for creating objects, while an object is an instance of a
class.
Example: A student should be able to explain that a class is like a blueprint for creating
objects, and an object is like a house built from the blueprint.
2. Encapsulation: Students should understand how encapsulation is used to group related
data and functions into a single unit called a class, and how this helps to organize code
and make it more modular.
Example: A student should be able to explain that encapsulation is like putting related
items in a box, which makes it easier to organize and find the items.
19. What is the difference between a class and an object in object-oriented programming?
A. A class is a blueprint for creating objects, while an object is an instance of a class
B. A class is an instance of an object, while an object is a blueprint for creating classes
C. A class and an object are the same things
D. A class is a function that performs a specific task, while an object is a variable that
stores a value
The statement "Students will be able to identify the differences between structural and
object-oriented programming paradigms" is a learning outcome that falls under the
Analysis level of the cognitive domain. Analysis involves breaking down information into
parts and examining the relationships between them. In this case, students are expected to
analyze the differences between two programming paradigms.
To achieve this learning outcome, students should be able to identify and analyze the following
differences between structural and object-oriented programming paradigms:
For example, a student may analyze the benefits of using object-oriented programming for
developing complex software systems, while also examining the limitations of structural
programming for such tasks. Additionally, students should be able to apply their knowledge of
each paradigm to design and implement code using appropriate programming techniques and
best practices.
Sample multiple-choice questions on identifying the differences between structural and
object-oriented programming paradigms
13. Which programming paradigm is more suited for developing complex software systems?
A. Structural programming
B. Object-oriented programming
C. Both programming paradigms are equally suited for developing complex software
systems.
D. Neither programming paradigm is suited for developing complex software systems.
15. Which programming paradigm is more focused on functions and procedures that operate
on data?
A. Structural programming
B. Object-oriented programming
C. Both programming paradigms are equally focused on functions and procedures that
operate on data.
D. Neither programming paradigm is focused on functions and procedures that operate on
data.
16. Which programming paradigm is more focused on objects that represent real-world
entities?
A. Structural programming
B. Object-oriented programming
C. Both programming paradigms are equally focused on objects that represent real-world
entities.
D. Neither programming paradigm is focused on objects that represent real-world entities.
17. Which programming paradigm is more focused on dividing code into modules?
A. Structural programming
B. Object-oriented programming
C. Both programming paradigms are equally focused on dividing code into modules.
D. Neither programming paradigm is focused on dividing code into modules.
18. Which programming paradigm allows for objects of different classes to be treated as if they
are of the same class?
A. Structural programming
B. Object-oriented programming
C. Both programming paradigms allow for objects of different classes to be treated as if
they are of the same class.
D. Neither programming paradigm allows for objects of different classes to be treated
as if they are of the same class.
19. Which programming paradigm relies on encapsulation and inheritance to achieve code
reusability?
A. Structural programming
B. Object-oriented programming
C. Both programming paradigms rely on encapsulation and inheritance to achieve code
reusability.
D. Neither programming paradigm relies on encapsulation and inheritance to achieve code
reusability.
20. Which programming paradigm is more focused on organizing code into smaller functions
and procedures?
A. Structural programming
B. Object-oriented programming
C. Both programming paradigms are equally focused on organizing code into smaller
functions and procedures.
D. Neither programming paradigm is focused on organizing code into smaller functions
and procedures.
The statement "Students will be able to use Java programming language to code, debug,
and execute results" is a learning outcome that falls under the Application level of the
cognitive domain. Application involves the ability to apply knowledge and skills to solve
problems or complete tasks. In this case, students are expected to apply their knowledge of Java
programming to write, debug, and execute code.
Example: A student should be able to write a Java program that calculates the average of a list
of numbers using loops and conditional statements.
Debug Java code: Students should be able to identify and resolve errors in Java code,
understand common programming errors, and use debugging tools to identify and fix
issues in their code.
Example: A student should be able to identify and fix errors in a Java program that is
returning incorrect results, using debugging tools such as breakpoints and logging.
Execute Java programs: Students should be able to compile and execute Java
programs, understand the different tools used to compile and execute Java code, and
troubleshoot issues related to program execution.
Example: A student should be able to compile and execute a Java program that reads a
file and prints the contents to the console.
Apply object-oriented programming principles: Students should be able to apply
object-oriented programming principles such as encapsulation, inheritance, and
polymorphism to write efficient and maintainable Java code.
Example: A student should be able to use inheritance to create a subclass that inherits
properties and methods from a superclass, and override methods in the subclass to
modify its behavior.
Use Java libraries and frameworks: Students should be able to use Java libraries and
frameworks to simplify coding tasks, increase productivity, and enhance the
functionality of their Java programs.
Example: A student should be able to use the JDBC (Java Database Connectivity)
library to connect to a database and retrieve data using Java code.
Sample Questions related to using Java programming language to code, debug, and
execute results
1. What is the first step in writing a Java program?
A. Debugging the code
B. Compiling the code
C. Writing the code
D. Executing the code
2. What is the process of identifying and resolving errors in Java code called?
A. Debugging
B. Compiling
C. Executing
D. Writing
3. What is the process of turning Java code into machine-readable instructions called?
A. Debugging
B. Compiling
C. Executing
D. Writing
12. Which of the following statements accurately describes the Java programming language?
A. Java is a compiled language
B. Java is an interpreted language
C. Java is a scripting language
D. Java is a mark-up language
13. Which of the following is the correct syntax for declaring a variable in Java?
A. int myVariable = 5;
B. myVariable int = 5;
C. variable myVariable = 5;
D. int = myVariable(5);
14. Which of the following is the correct syntax to create a new instance of an object in Java?
A. object = new Object();
B. Object = new object();
C. Object = new Object;
D. object = new object;
15. What is the purpose of the "public static void main (String [] args)" method in Java?
A. It is the starting point of a Java program.
B. It is used to declare variables.
C. It is used to print output to the console.
D. It is used to create new objects.
16. Which of the following is the correct syntax of a for loop in Java?
A. for i = 0; i < 10; i++
B. for (int i = 0; i <10; i++)
C. for (i = 0; i < 10; i++)
D. for (int i < 10; i++)
17. Which of the following is the correct syntax for a while loop in Java?
A. while (i < 10) { }
B. while i < 10 { }
C. while (i < 10);
D. while i < 10: { }
18. Which of the following is the correct syntax for a conditional statement in Java?
A. if (x = 5)
B. if (x == 5)
C. if x = 5
D. if x == 5
19. Which of the following is the correct syntax to declare and initialize an array in Java?
A. int[] myArray = new int[5];
B. myArray[] = {1, 2, 3, 4, 5};
C. int myArray[5] = {1, 2, 3, 4, 5};
D. myArray = new int[5] {1, 2, 3, 4, 5};
20. Which of the following is the correct way to catch an exception in Java?
A. try { } catch Exception { }
B. try { } catch (Exception e) { }
C. catch (Exception e) { } try { }
D. catch Exception { } try { }
21. Which of the following is the correct way to print output to the console in Java?
A. print("Hello World");
B. System.out.print("Hello World");
C. console.log("Hello World");
D. printf("Hello World");