Skip to content

Object Oriented Programming

CIS · Quiz · Fall 26

Section a,b,c

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Daffodil International University Department of computing and information Systems Subject : Object-Oriented Programming Code: CIS-216 Quiz 1 - Fall 2026 Time Allowed: 20 Minutes Total Marks: 15 Instructions: Read the questions carefully. Write clear and concise descriptive answers. Question 1: Java Core Principles & Features (5 Marks) (A) Java's core principle is famously described as "Write Once, Run Anywhere" (WORA). (A) Explain what this principle means in the context of Java's platform independence and how it is achieved. (2 Marks) (B) Apart from being platform-independent, list and briefly describe three other key features/characteristics of Java mentioned in the introductory text. (3 Marks) Question 2: Data Types and Loops (5 Marks) (A) Java categorizes data types into Primitive and Non-Primitive. Briefly explain what primitive data types define, and provide two examples of primitive types and two examples of non-primitve types. (3 Marks) (B) Java provides several types of loops to handle repeated execution. Explain the primary execution difference between a while loop and a do-while loop. (2 Marks) Question 3: Types of Methods (5 Marks) (A) Methods in Java can be categorized broadly as Predefined Methods and User-defined Methods. Define both terms and provide one example for each based on the text. (3 Marks) (B) When creating methods in a class, you can create an Instance Method or a Static Method. Explain the difference in how these two types of methods are called/accessed. (2 Marks) Daffodil International University Department of computing and information Systems Subject : Object-Oriented Programming Code: CIS-216 Quiz 1 - Fall 2026 Time Allowed: 20 Minutes Total Marks: 15 Instructions: Read the questions carefully. Write clear and concise descriptive answers. Question 1: Java Execution Architecture (5 Marks) Java is highly regarded for its performance and platform independence. Describe the complete step-by-step execution process of a Java program (from saving the file to executing it). In your explanation, explicitly define the exact roles of the Java Compiler (javac), the Java Virtual Machine (JVM), and the Just-In-Time (JIT) compiler. Question 2: Java Environments and Variables (5 Marks) (A) The Java development environment consists of three main components: JVM, JRE, and JDK. Write the relationship/equations that define what the JRE and JDK consist of. (2 Marks) (B) Variables are the basic unit of storage in a Java program. Explain the difference between an Instance Variable and a Static Variable. (3 Marks) Question 3: Methods and the Call Stack (5 Marks) (A) What is the Call Stack in Java, and what data structure principle does it operate on? Briefly describe what happens to the call stack when a method is called, and what happens when it finishes execution. (3 Marks) (B) Define what a Method Signature is in Java. What specific components does it include, and what does it explicitly exclude? (2 Marks) Daffodil International University Department of computing and information Systems Subject : Object-Oriented Programming Code: CIS-216 Quiz 1 - Fall 2026 Time Allowed: 20 Minutes Total Marks: 15 Instructions: Read the questions carefully. Write clear and concise descriptive answers. Question 1: Java Syntax and Real-World Applications (5 Marks) (A) In every basic Java program, the execution begins at a specific line of code: public static void main(String[] args). Based on the text's explanation of the "Hello World" program, what does this line represent? (2 Marks) (B) Comments are notes written inside the code that are ignored by the compiler. Identify the three types of comments in Java mentioned in the text and briefly explain the formatting/purpose of each. (3 Marks) Question 2: Operators and Decision Making (5 Marks) (A) Java provides various operators to manipulate data. Identify what the Ternary Operator is by providing its basic syntax/structure as shown in the text. (2 Marks) (B) Decision-making statements allow a Java program to choose an execution path. Briefly explain the difference in how an if-else-if ladder and a switch statement evaluate conditions. (3 Marks) Question 3: Method Benefits and Conventions (5 Marks) (A) Breaking a program down into separate methods provides several advantages. State and briefly describe three key benefits of using methods in Java. (3 Marks) (B) Standard conventions dictate how methods should be named in Java. What are the specific rules for naming a method (including format and grammar) as described in the text? (2 Marks)