SlideShare a Scribd company logo
EXAMINATION AND EVALUATION DIVISION 
DEPARTMENT OF POLYTECHNIC EDUCATION 
(MINISTRY OF HIGHER EDUCATION) 
INFORMATION & COMMUNICATION TECHNOLOGY (ICT) 
DEPARTMENT 
FINAL EXAMINATION 
JUNE 2012 SESSION 
FP301: OBJECT ORIENTED PROGRAMMING 
DATE: 21 NOVEMBER 2012 (WEDNESDAY) 
DURATION: 2 HOURS (2.30PM-4.30PM) 
This paper consists of SEVENTEEN (17) pages including the front page. 
Section A: Objective (40 questions – answer ALL) 
Section B: Structure (2 questions – answer ALL). 
CONFIDENTIAL 
DO NOT OPEN THIS QUESTION PAPER UNTIL INSTRUCTED BY THE CHIEF INVIGILATOR 
(The CLO stated is for reference only)
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 2 of 17 
SECTION A 
OBJECTIVE QUESTIONS (50 marks) 
INSTRUCTION: 
This section consists of FORTY (40) objective questions. Answer ALL questions in the answer booklet. 
1. UML is the acronym of _________________________ [CLO1] 
A. Unification Multi Language 
B. Unify Multimedia Language 
C. United Modeling Language 
D. Unified Modeling Language 
2. Which of the following terminologies is used to describe the data component in UML class diagram. [CLO1] 
A. Attribute 
B. Method 
C. Object 
D. Class 
3. Which of the following define the best statement of object oriented analysis? [CLO1] 
A. The process of defining the problem in terms of real-world objects with which the system must interact 
B. The process of defining the components, interfaces, objects, classes, attributes, and operations that will satisfy the requirements 
C. The process of defining the problem, scenario, and operations that will satisfy the requirements 
D. The process of defining the components, interfaces, objects, classes, attributes, and operations which the system must interact 
4. Which of the following statements is correct? [CLO1] 
A. Every class must end with a semicolon. 
B. Every comment line must end with a semicolon. 
C. Every line in a program must end with a semicolon. 
D. Every statement in a program must end with a semicolon
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 3 of 17 
5. What is byte code in the context of Java? [CLO1] 
A. It is the code written within the instance methods of a class. 
B. The type of code generated by a Java Virtual Machine. 
C. The type of code generated by a Java compiler. 
D. It is another name for a Java source file. 
6. Select the best description about data type. 
[CLO1] 
A. The part of the CPU that does arithmetic. 
B. A part of main memory used to store data. 
C. The collection of variables that a program uses. 
D. A particular scheme for representing values with bit patterns. 
7. Why is main() method special in a Java program? [CLO1] 
A. It is where the Java interpreter starts the whole program running. 
B. Only the main() method may create objects. 
C. Every class must have a main() method. 
D. The main() method must be the only static method in a program. 
8. The act of creating an object of given class is called ___________ [CLO1] 
A. Declaration 
B. Referencing 
C. Instantiation 
D. Implementation 
9. Which one of the following illustrates proper naming convention in Java programming style? [CLO1] 
A. int StudentName; 
B. final double MAXVALUE = 3.547; 
C. public class compute_Area(){} 
D. public static int ReadDouble(){}
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 4 of 17 
10. What value will be the result if you attempt to add an int, a byte, a long and a double? [CLO1] 
A. byte 
B. int 
C. long 
D. Double 
11. Which of the following statements correctly creates an input stream by user input? [CLO1] 
A. BufferedReader kb = new InputStreamReader(System.in); 
B. BufferedReader kb = new BufferedReader( ); 
C. BufferedReader kb = new BufferedReader(InputStreamReader(System.in)); 
D. BufferedReader kb = new BufferedReader (new InputStreamReader 
(System.in)); 
12. This operator performs an arithmetic or signed right shift. Which of the following is the symbol of the operator? [CLO1] 
A. >> 
B. >>> 
C. << 
D. <<< 
13. Which of the following statements is correct to display Welcome to Java?[CLO2] 
A. System.out.println('Welcome to Java'); 
B. System.out.println("Welcome to Java"); 
C. System.println('Welcome to Java'); 
D. System.print('Welcome to Java'); 
14. Given a java class as follows: 
In order to compile this program, the source code should be stored in a file _____ 
[CLO2] 
A. Test.class 
B. Test.java 
C. Test.doc 
D. Test.txt 
public class Test {}
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 5 of 17 
15. Consider the following code snippet: 
What would you write in order to instantiate MyClass? [CLO2] 
A. MyClass mc = new MyClass(); 
B. MyClass mc = new MyClass; 
C. MyClass mc = MyClass(); 
D. MyClass mc = MyClass; 
16. Which will legally declare, construct, and initialize an array? [CLO2] 
A. int [] myList = {"1", "2", "3"}; 
B. int [] myList = (5, 8, 2); 
C. int myList [] [] = {4,9,7,0}; 
D. int myList [] = {4, 3, 7}; 
17. What are the three parts of a counting loop that must be coordinated in order for the loop to work properly? [CLO2] 
A. Initializing the condition, changing the condition, terminating the loop. 
B. Initializing the counter, testing the counter, changing the counter. 
C. The while statement, the if statement, and sequential execution. 
D. The while, the assignment, and the loop body. 
public class MyClass{ 
public MyClass() 
{ /*code*/ } 
}
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 6 of 17 
18. Analyze the following code: 
Select the best statement that describes the program [CLO3] 
A. The program has compile errors because the variable radius is not initialized. 
B. The program has a compile error because a constant PI is defined inside a method. 
C. The program has no compile errors but will get a runtime error because radius is not initialized. 
D. The program compiles and runs fine. 
19. Examine the following code: 
What is the output? [CLO3] 
A. 1 2 3 4 5 6 
B. 0 2 4 6 8 
C. 0 2 4 6 
D. 0 2 4 
20. What is the difference between ‘Exception’ and ‘error’ in Java? [CLO1] 
A. Exception class is used for exceptional conditions that user program should catch. 
B. Error defines exceptions that are not excepted to be caught by the program. 
C. Exception and Error are the subclasses of the Throwable class. 
D. All of the above. 
public class Test { public static void main(String[] args) { double radius; final double PI= 3.15169; double area = radius * radius * PI; System.out.println("Area is " + area); } } 
int count = 0; 
while ( count <= 6 ) 
{ 
System.out.print( count + " " ); 
count = count + 2; 
} 
System.out.println( );
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 7 of 17 
21. The following are keywords in exception handling except [CLO1] 
A. try 
B. finally 
C. caught 
D. throw 
22. Choose the common exception type [CLO1] 
i. NullPointerException 
ii. NumberFormatException 
iii. SecurityException 
A. i, ii 
B. i, iii 
C. ii, iii 
D. i, ii, iii 
23. Which is TRUE about assertion? [CLO1] 
A. Assertion is a mechanism used by many programming languages to describe what to do when something unexpected happen. 
B. Assertion is a way to test some assumption about the logic of a program. 
C. Assertion is a part of the program and cannot be removed independently from the program. 
D. All of the above. 
24. What does exception type in the following program throw? [CLO2] 
A. ArithmeticException 
B. ArrayIndexOutOfBoundsException 
C. StringIndexOutOfBoundsException 
D. ClassCastException 
public class Test { public static void main(String[] args) { int[] list = new int[5]; System.out.println(list[5]); } }
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 8 of 17 
25. Given the following code: 
Which could be used to create an appropriate catch block? [CLO2] 
A. ClassCastException 
B. IllegalStateException 
C. NumberFormatException 
D. IllegalArgumentException 
26. What will be the output of the following program? [CLO3] 
A. finally 
exception 
finished 
B. exception 
finished 
C. finally 
D. Compilation fails 
try { int x = Integer.parseInt(“two”); } 
public class Test { 
public static void aMethod() throws Exception { 
try { 
throw new Exception(); 
} finally { 
System.out.println(“finally”); 
} 
public static void main(String args[]) { 
try { 
aMethod(); 
} catch (Exception e) { 
System.out.println(“exception”); 
} 
System.out.println(“finished”) 
} 
}
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 9 of 17 
27. What will be the result of compiling and running the program below? [CLO3] 
A. Run time error 
B. Compile time error 
C. Program compiles correctly and print “A” when executed 
D. Program compiles correctly and prints “A” and “C” when executed 
28. Which methods can access a private attribute? [CLO1] 
A. Only classes in the same package. 
B. Only static methods in the same class. 
C. Only those defined in the same class. 
D. Only instance methods in the same class. 
29. Which of the following is the general scheme for a class definition? [CLO1] 
A. Class ClassName { 
// Description of the instance variables. 
// Description of the constructors. 
// Description of the methods.} 
B. class ClassName { 
// Description of the instance variables. 
// Description of the constructors. 
// Description of the methods.} 
C. ClassName { 
// Description of the instance variables. 
// Description of the constructors. 
// Description of the methods.} 
D. class ClassName { }; 
public class Exception { 
public static void main(String[] args){ 
System.out.println(“A”); 
try{} 
catch(java.io.IOException t) { 
System.out.println(“B”); 
} 
} 
}
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 10 of 17 
30. average = calculate (no1, no2, no3) 
What is the type of parameter passing based on the above coding. [CLO1] 
A. Call by value 
B. Call by object 
C. Call by parameter 
D. Call waiting 
31. If a method assigns a new value to a member of an object which can be accessed through an object reference parameter, will this have any effect on its caller? 
[CLO1] 
A. No, because it only has a copy of the object. 
B. No, because it does not allow to do this. 
C. Yes, this will change part of the object that both it and the caller are referring to. 
D. Yes, the caller will now get a new object. 
32. Which one of Java packages below is used for basic language functionality and fundamentals types? [CLO1] 
A. java.lang 
B. java.util 
C. java.math 
D. java.io 
33. A constructor ________ [CLO1] 
A. must have the same name as the class it is declared within 
B. is used to create objects 
C. maybe declared private 
D. all of the above
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 11 of 17 
34. A String class _________________________________________ [CLO1] 
i. is final 
ii. is public 
iii. is serializable 
iv. has a constructor which takes a StringBuffer objects as an arguments 
A. i only 
B. i, ii 
C. i, ii, iii 
D. All of the above 
35. Which of the following is a correct syntax for defining a new class Cupboard based on the superclass Furniture? [CLO 2] 
A. class Cupboard isa Furniture { //additional definitions go here } 
B. class Cupboard implements Furniture { //additional definitions go here } 
C. class Cupboard defines Furniture { //additional definitions go here } 
D. class Cupboard extends Furniture { //additional definitions go here } 
36. Which three lines of codes are equivalent to line 3? [CLO 2] 
i. final int k = 4; 
ii. public int k = 4; 
iii. static int k = 4; 
iv. abstract int k = 4; 
A. i, ii, iii 
B. ii, iii, iv 
C. i, iii,iv 
D. All of the above 
public interface Foo 
{ 
int k = 4; /* Line 3 */ 
}
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 12 of 17 
37. What is the output of the following segment program? 
[CLO 2] 
A. fa fa 
B. fa la 
C. la la 
D. Compilation fails 
38. Consider the following coding 
[CLO 2] 
What is the output? 
A. 6 
B. river 
C. 8 
D. Columbia 
39. Which of the following defines a legal abstract class? 
[CLO 3] 
A. abstract class Vehicle { abstract void display(); } 
B. class Vehicle { abstract void display(); } 
C. abstract Vehicle { abstract void display(); } 
D. class abstract Vehicle { abstract void display(); } 
public class Tenor extends Singer { 
public static String sing(){ return “fa”;} 
public static void main(String[] args { 
Tenor t = new Tenor(); 
Singer s = new Tenor(); 
System.out.println(t.sing() + “ “ + s.sing()); 
} 
} 
String river = new String(“Columbia”); 
System.out.println(river.length());
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 13 of 17 
40. Which of the statement, is NOT correct to declare an interface? 
[CLO 3] 
A. 
B. 
C. 
D. 
public interface Marker { 
} 
public interface SomethingIsWrong { 
voidaMethod(intaValue); 
} 
public interface SomethingIsWrong { 
voidaMethod(intaValue) { 
System.out.println("Hi Mom");} 
} 
publicRectanglePlus(Point p, int w, int h) { 
origin = p; 
width = w; 
height = h; 
}
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 14 of 17 
SECTION B 
STRUCTURED QUESTIONS (50 marks) 
INSTRUCTION: 
This section consists of TWO (2) structured questions. Answer ALL questions. 
QUESTION 1 
a. Refer to Figure 1, define source program, Java compiler and Java bytecodes. [CLO1] 
Figure 1 : Program Flow 
(6 marks) 
b. Car is a real world object and it has its own characteristics like colour of the car, model of the car and engine capacity. We can drive the car and stop it. Draw an UML class diagram to show the attributes and the behaviors of a car. [CLO2] 
(7 marks) 
c. Based on your answer in 1(b), write a class definition for class Car by using Java. [CLO3] 
(7 marks) 
d. Write a program to accept a number from the user. Use the assert statement to determine the entered number is within the valid range between 0 and 20. 
[CLO3] 
(5 marks)
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 15 of 17 
QUESTION 2 
a. Explain briefly the operators below: [CLO1] 
i. Conditional operator (2 marks) 
ii. Logical operator (2 marks) 
iii. Left-shift operator (2 marks) 
b. Write a program to get 3 values of array elements from command line with those values in the main() method. Add try and catch block to handle ArrayIndexOutOfBoundsException. [CLO2] 
(5 marks) 
c. Write a command to enable assertion when you run Java program. [CLO2] 
(2 marks)
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 16 of 17 
d. The class Birthday is the parent for the two new classes, YouthBirthday and AdultBirthday. Each of the new classes would ordinarily inherit the greeting() method from Birthday. 
YouthBirthday birthday card for young people. This card will add the line "How you have grown!" to the usual birthday greeting. An AdultBirthday birthday card is for old people. This card will add the line "You haven't changed at all!" to the usual birthday greeting. 
class Birthday { 
int age; 
public Birthday ( String r, int years ) { 
recipient = r; 
age = years; 
} 
public void greeting() { 
System.out.println("Dear " + recipient + ",n"); 
System.out.println("Happy " + age + "th Birthdaynn"); 
} 
} 
Based on the above coding,
CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING 
Page 17 of 17 
i. complete the following definition for class YouthBirthday. [CLO3] 
class ______(a)______ extends ________(b)_______ 
{ 
public ________(c)_______ ( String r, int years ) 
{ 
____________(d)_______ ( r, years ) 
} 
public void greeting() 
{ 
__________(e)___________(); 
System.out.println("How you have grown!!n"); 
} 
} 
(5 marks) 
ii. write a new class definition for AdultBirthday with an overriding method greeting() in it. [CLO3] 
(7 marks)

More Related Content

What's hot

Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentation
fazli khaliq
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C Language
Tarun Sharma
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
LOKENDRA PRAJAPATI
 
Deployment Diagram
Deployment DiagramDeployment Diagram
Deployment Diagram
University of Texas at Dallas
 
PLSQL CURSOR
PLSQL CURSORPLSQL CURSOR
PLSQL CURSOR
Arun Sial
 
Software Engineering MCQs
Software Engineering MCQsSoftware Engineering MCQs
Software Engineering MCQs
Gurpreet singh
 
Modeling System Requirement
Modeling System RequirementModeling System Requirement
Modeling System Requirement
Henhen Lukmana
 
Modern Programming Languages - An overview
Modern Programming Languages - An overviewModern Programming Languages - An overview
Modern Programming Languages - An overview
Ayman Mahfouz
 
SE Quiz
SE QuizSE Quiz
Final Year Project (ISP),Project Demo
Final Year Project (ISP),Project DemoFinal Year Project (ISP),Project Demo
Final Year Project (ISP),Project Demo
Abdul Aslam
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
Md.Al-imran Roton
 
Friends function and_classes
Friends function and_classesFriends function and_classes
Friends function and_classesasadsardar
 
Packages in java
Packages in javaPackages in java
Packages in java
Elizabeth alexander
 
Software Testing and UML Lab
Software Testing and UML LabSoftware Testing and UML Lab
Software Testing and UML Lab
Harsh Kishore Mishra
 
Introduction to method overloading &amp; method overriding in java hdm
Introduction to method overloading &amp; method overriding  in java  hdmIntroduction to method overloading &amp; method overriding  in java  hdm
Introduction to method overloading &amp; method overriding in java hdm
Harshal Misalkar
 
Interfaces in java
Interfaces in javaInterfaces in java
Interfaces in java
Shiv Mehmi
 

What's hot (20)

Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentation
 
Oops concept on c#
Oops concept on c#Oops concept on c#
Oops concept on c#
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C Language
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
Deployment Diagram
Deployment DiagramDeployment Diagram
Deployment Diagram
 
PLSQL CURSOR
PLSQL CURSORPLSQL CURSOR
PLSQL CURSOR
 
Software Engineering MCQs
Software Engineering MCQsSoftware Engineering MCQs
Software Engineering MCQs
 
Modeling System Requirement
Modeling System RequirementModeling System Requirement
Modeling System Requirement
 
SDD-FinalYearProject
SDD-FinalYearProjectSDD-FinalYearProject
SDD-FinalYearProject
 
Modern Programming Languages - An overview
Modern Programming Languages - An overviewModern Programming Languages - An overview
Modern Programming Languages - An overview
 
Staruml
StarumlStaruml
Staruml
 
SE Quiz
SE QuizSE Quiz
SE Quiz
 
Final Year Project (ISP),Project Demo
Final Year Project (ISP),Project DemoFinal Year Project (ISP),Project Demo
Final Year Project (ISP),Project Demo
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
 
Friends function and_classes
Friends function and_classesFriends function and_classes
Friends function and_classes
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Software Testing and UML Lab
Software Testing and UML LabSoftware Testing and UML Lab
Software Testing and UML Lab
 
Introduction to method overloading &amp; method overriding in java hdm
Introduction to method overloading &amp; method overriding  in java  hdmIntroduction to method overloading &amp; method overriding  in java  hdm
Introduction to method overloading &amp; method overriding in java hdm
 
interface in c#
interface in c#interface in c#
interface in c#
 
Interfaces in java
Interfaces in javaInterfaces in java
Interfaces in java
 

Viewers also liked

FINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEM
FINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEMFINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEM
FINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEMAmira Dolce Farhana
 
Problem Based Task 1
Problem Based Task 1Problem Based Task 1
Problem Based Task 1rozimm78
 
FP305 data structure june 2012
FP305   data structure june 2012FP305   data structure june 2012
FP305 data structure june 2012
Syahriha Ruslan
 
FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012
FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012
FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012
Syahriha Ruslan
 
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
OBJECT ORIENTED ROGRAMMING With Question And Answer  FullOBJECT ORIENTED ROGRAMMING With Question And Answer  Full
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
Manas Rai
 
FP305 data structure
FP305     data structure FP305     data structure
FP305 data structure
Syahriha Ruslan
 
Final paper FN511 Switching & Routing
Final paper FN511 Switching & RoutingFinal paper FN511 Switching & Routing
Final paper FN511 Switching & Routing
Amira Dolce Farhana
 
FP 303 COMPUTER NETWORK PAPER FINAL Q
FP 303 COMPUTER NETWORK PAPER FINAL QFP 303 COMPUTER NETWORK PAPER FINAL Q
FP 303 COMPUTER NETWORK PAPER FINAL Q
Syahriha Ruslan
 
Final exam review answer(networking)
Final exam review answer(networking)Final exam review answer(networking)
Final exam review answer(networking)welcometofacebook
 
FP 303 COMPUTER NETWORK PAPER FINAL
FP 303 COMPUTER NETWORK PAPER FINALFP 303 COMPUTER NETWORK PAPER FINAL
FP 303 COMPUTER NETWORK PAPER FINAL
Syahriha Ruslan
 
Final paper FN512 server management
Final paper FN512 server managementFinal paper FN512 server management
Final paper FN512 server management
Amira Dolce Farhana
 
problem based task oop
problem based task oopproblem based task oop
problem based task oop
Farhanum Aziera
 
OOP Chapter 3: Classes, Objects and Methods
OOP Chapter 3: Classes, Objects and MethodsOOP Chapter 3: Classes, Objects and Methods
OOP Chapter 3: Classes, Objects and Methods
Atit Patumvan
 
Soalan kejuruteraan perisian dan pembangunan sistem
Soalan kejuruteraan perisian dan pembangunan sistemSoalan kejuruteraan perisian dan pembangunan sistem
Soalan kejuruteraan perisian dan pembangunan sistemfafa111283
 
Exercises TCP/IP Networking With Solutions
Exercises TCP/IP Networking With SolutionsExercises TCP/IP Networking With Solutions
Exercises TCP/IP Networking With Solutions
Felipe Suarez
 
Roadmap iDBMS (sebelum ambil alih)
Roadmap iDBMS (sebelum ambil alih)Roadmap iDBMS (sebelum ambil alih)
Roadmap iDBMS (sebelum ambil alih)
Kolej Komuniti
 
Data Structures (BE)
Data Structures (BE)Data Structures (BE)
Data Structures (BE)
PRABHAHARAN429
 
FINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEMFINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEMAmira Dolce Farhana
 
Data structure-questions
Data structure-questionsData structure-questions
Data structure-questionsShekhar Chander
 
Data structures question paper anna university
Data structures question paper anna universityData structures question paper anna university
Data structures question paper anna universitysangeethajames07
 

Viewers also liked (20)

FINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEM
FINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEMFINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEM
FINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEM
 
Problem Based Task 1
Problem Based Task 1Problem Based Task 1
Problem Based Task 1
 
FP305 data structure june 2012
FP305   data structure june 2012FP305   data structure june 2012
FP305 data structure june 2012
 
FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012
FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012
FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012
 
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
OBJECT ORIENTED ROGRAMMING With Question And Answer  FullOBJECT ORIENTED ROGRAMMING With Question And Answer  Full
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
 
FP305 data structure
FP305     data structure FP305     data structure
FP305 data structure
 
Final paper FN511 Switching & Routing
Final paper FN511 Switching & RoutingFinal paper FN511 Switching & Routing
Final paper FN511 Switching & Routing
 
FP 303 COMPUTER NETWORK PAPER FINAL Q
FP 303 COMPUTER NETWORK PAPER FINAL QFP 303 COMPUTER NETWORK PAPER FINAL Q
FP 303 COMPUTER NETWORK PAPER FINAL Q
 
Final exam review answer(networking)
Final exam review answer(networking)Final exam review answer(networking)
Final exam review answer(networking)
 
FP 303 COMPUTER NETWORK PAPER FINAL
FP 303 COMPUTER NETWORK PAPER FINALFP 303 COMPUTER NETWORK PAPER FINAL
FP 303 COMPUTER NETWORK PAPER FINAL
 
Final paper FN512 server management
Final paper FN512 server managementFinal paper FN512 server management
Final paper FN512 server management
 
problem based task oop
problem based task oopproblem based task oop
problem based task oop
 
OOP Chapter 3: Classes, Objects and Methods
OOP Chapter 3: Classes, Objects and MethodsOOP Chapter 3: Classes, Objects and Methods
OOP Chapter 3: Classes, Objects and Methods
 
Soalan kejuruteraan perisian dan pembangunan sistem
Soalan kejuruteraan perisian dan pembangunan sistemSoalan kejuruteraan perisian dan pembangunan sistem
Soalan kejuruteraan perisian dan pembangunan sistem
 
Exercises TCP/IP Networking With Solutions
Exercises TCP/IP Networking With SolutionsExercises TCP/IP Networking With Solutions
Exercises TCP/IP Networking With Solutions
 
Roadmap iDBMS (sebelum ambil alih)
Roadmap iDBMS (sebelum ambil alih)Roadmap iDBMS (sebelum ambil alih)
Roadmap iDBMS (sebelum ambil alih)
 
Data Structures (BE)
Data Structures (BE)Data Structures (BE)
Data Structures (BE)
 
FINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEMFINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEM
 
Data structure-questions
Data structure-questionsData structure-questions
Data structure-questions
 
Data structures question paper anna university
Data structures question paper anna universityData structures question paper anna university
Data structures question paper anna university
 

Similar to FP 301 OOP FINAL PAPER JUNE 2013

Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docx
rosemarybdodson23141
 
Fp304 DATABASE SYSTEM JUNE 2012
Fp304   DATABASE SYSTEM JUNE 2012Fp304   DATABASE SYSTEM JUNE 2012
Fp304 DATABASE SYSTEM JUNE 2012
Syahriha Ruslan
 
Part - 2 Cpp programming Solved MCQ
Part - 2  Cpp programming Solved MCQ Part - 2  Cpp programming Solved MCQ
Part - 2 Cpp programming Solved MCQ
Knowledge Center Computer
 
Kality CS Model_Exit_Exams_with_answer - Copy (2).doc
Kality CS Model_Exit_Exams_with_answer - Copy (2).docKality CS Model_Exit_Exams_with_answer - Copy (2).doc
Kality CS Model_Exit_Exams_with_answer - Copy (2).doc
AnimutGeremew3
 
Java Quiz
Java QuizJava Quiz
Java Quiz
Dharmraj Sharma
 
classes object fgfhdfgfdgfgfgfgfdoop.pptx
classes object  fgfhdfgfdgfgfgfgfdoop.pptxclasses object  fgfhdfgfdgfgfgfgfdoop.pptx
classes object fgfhdfgfdgfgfgfgfdoop.pptx
arjun431527
 
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Udayan Khattry
 
Module wise format oops questions
Module wise format oops questionsModule wise format oops questions
Module wise format oops questionsSANTOSH RATH
 
17432 object oriented programming
17432   object oriented programming17432   object oriented programming
17432 object oriented programming
soni_nits
 
C# programming constructors
C# programming  constructorsC# programming  constructors
C# programming constructors성진 원
 
Oop suplemnertary september 2019
Oop suplemnertary september  2019Oop suplemnertary september  2019
Oop suplemnertary september 2019
ktuonlinenotes
 
Technical aptitude Test 1 CSE
Technical aptitude Test 1 CSETechnical aptitude Test 1 CSE
Technical aptitude Test 1 CSE
Sujata Regoti
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSE
Sujata Regoti
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)
Ankit Dubey
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
Knowledge Center Computer
 
Question Paper Code 065 informatic Practice New CBSE - 2021
Question Paper Code 065 informatic Practice New CBSE - 2021 Question Paper Code 065 informatic Practice New CBSE - 2021
Question Paper Code 065 informatic Practice New CBSE - 2021
FarhanAhmade
 
Object Oriented Programming - Constructors & Destructors
Object Oriented Programming - Constructors & DestructorsObject Oriented Programming - Constructors & Destructors
Object Oriented Programming - Constructors & Destructors
Dudy Ali
 
C# Tutorial MSM_Murach chapter-15-slides
C# Tutorial MSM_Murach chapter-15-slidesC# Tutorial MSM_Murach chapter-15-slides
C# Tutorial MSM_Murach chapter-15-slides
Sami Mut
 
U19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).pptU19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).ppt
Manivannan837728
 
Bis 311 final examination answers
Bis 311 final examination answersBis 311 final examination answers
Bis 311 final examination answers
RandalHoffman
 

Similar to FP 301 OOP FINAL PAPER JUNE 2013 (20)

Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docx
 
Fp304 DATABASE SYSTEM JUNE 2012
Fp304   DATABASE SYSTEM JUNE 2012Fp304   DATABASE SYSTEM JUNE 2012
Fp304 DATABASE SYSTEM JUNE 2012
 
Part - 2 Cpp programming Solved MCQ
Part - 2  Cpp programming Solved MCQ Part - 2  Cpp programming Solved MCQ
Part - 2 Cpp programming Solved MCQ
 
Kality CS Model_Exit_Exams_with_answer - Copy (2).doc
Kality CS Model_Exit_Exams_with_answer - Copy (2).docKality CS Model_Exit_Exams_with_answer - Copy (2).doc
Kality CS Model_Exit_Exams_with_answer - Copy (2).doc
 
Java Quiz
Java QuizJava Quiz
Java Quiz
 
classes object fgfhdfgfdgfgfgfgfdoop.pptx
classes object  fgfhdfgfdgfgfgfgfdoop.pptxclasses object  fgfhdfgfdgfgfgfgfdoop.pptx
classes object fgfhdfgfdgfgfgfgfdoop.pptx
 
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
 
Module wise format oops questions
Module wise format oops questionsModule wise format oops questions
Module wise format oops questions
 
17432 object oriented programming
17432   object oriented programming17432   object oriented programming
17432 object oriented programming
 
C# programming constructors
C# programming  constructorsC# programming  constructors
C# programming constructors
 
Oop suplemnertary september 2019
Oop suplemnertary september  2019Oop suplemnertary september  2019
Oop suplemnertary september 2019
 
Technical aptitude Test 1 CSE
Technical aptitude Test 1 CSETechnical aptitude Test 1 CSE
Technical aptitude Test 1 CSE
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSE
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
 
Question Paper Code 065 informatic Practice New CBSE - 2021
Question Paper Code 065 informatic Practice New CBSE - 2021 Question Paper Code 065 informatic Practice New CBSE - 2021
Question Paper Code 065 informatic Practice New CBSE - 2021
 
Object Oriented Programming - Constructors & Destructors
Object Oriented Programming - Constructors & DestructorsObject Oriented Programming - Constructors & Destructors
Object Oriented Programming - Constructors & Destructors
 
C# Tutorial MSM_Murach chapter-15-slides
C# Tutorial MSM_Murach chapter-15-slidesC# Tutorial MSM_Murach chapter-15-slides
C# Tutorial MSM_Murach chapter-15-slides
 
U19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).pptU19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).ppt
 
Bis 311 final examination answers
Bis 311 final examination answersBis 311 final examination answers
Bis 311 final examination answers
 

Recently uploaded

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 

Recently uploaded (20)

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 

FP 301 OOP FINAL PAPER JUNE 2013

  • 1. EXAMINATION AND EVALUATION DIVISION DEPARTMENT OF POLYTECHNIC EDUCATION (MINISTRY OF HIGHER EDUCATION) INFORMATION & COMMUNICATION TECHNOLOGY (ICT) DEPARTMENT FINAL EXAMINATION JUNE 2012 SESSION FP301: OBJECT ORIENTED PROGRAMMING DATE: 21 NOVEMBER 2012 (WEDNESDAY) DURATION: 2 HOURS (2.30PM-4.30PM) This paper consists of SEVENTEEN (17) pages including the front page. Section A: Objective (40 questions – answer ALL) Section B: Structure (2 questions – answer ALL). CONFIDENTIAL DO NOT OPEN THIS QUESTION PAPER UNTIL INSTRUCTED BY THE CHIEF INVIGILATOR (The CLO stated is for reference only)
  • 2. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 2 of 17 SECTION A OBJECTIVE QUESTIONS (50 marks) INSTRUCTION: This section consists of FORTY (40) objective questions. Answer ALL questions in the answer booklet. 1. UML is the acronym of _________________________ [CLO1] A. Unification Multi Language B. Unify Multimedia Language C. United Modeling Language D. Unified Modeling Language 2. Which of the following terminologies is used to describe the data component in UML class diagram. [CLO1] A. Attribute B. Method C. Object D. Class 3. Which of the following define the best statement of object oriented analysis? [CLO1] A. The process of defining the problem in terms of real-world objects with which the system must interact B. The process of defining the components, interfaces, objects, classes, attributes, and operations that will satisfy the requirements C. The process of defining the problem, scenario, and operations that will satisfy the requirements D. The process of defining the components, interfaces, objects, classes, attributes, and operations which the system must interact 4. Which of the following statements is correct? [CLO1] A. Every class must end with a semicolon. B. Every comment line must end with a semicolon. C. Every line in a program must end with a semicolon. D. Every statement in a program must end with a semicolon
  • 3. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 3 of 17 5. What is byte code in the context of Java? [CLO1] A. It is the code written within the instance methods of a class. B. The type of code generated by a Java Virtual Machine. C. The type of code generated by a Java compiler. D. It is another name for a Java source file. 6. Select the best description about data type. [CLO1] A. The part of the CPU that does arithmetic. B. A part of main memory used to store data. C. The collection of variables that a program uses. D. A particular scheme for representing values with bit patterns. 7. Why is main() method special in a Java program? [CLO1] A. It is where the Java interpreter starts the whole program running. B. Only the main() method may create objects. C. Every class must have a main() method. D. The main() method must be the only static method in a program. 8. The act of creating an object of given class is called ___________ [CLO1] A. Declaration B. Referencing C. Instantiation D. Implementation 9. Which one of the following illustrates proper naming convention in Java programming style? [CLO1] A. int StudentName; B. final double MAXVALUE = 3.547; C. public class compute_Area(){} D. public static int ReadDouble(){}
  • 4. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 4 of 17 10. What value will be the result if you attempt to add an int, a byte, a long and a double? [CLO1] A. byte B. int C. long D. Double 11. Which of the following statements correctly creates an input stream by user input? [CLO1] A. BufferedReader kb = new InputStreamReader(System.in); B. BufferedReader kb = new BufferedReader( ); C. BufferedReader kb = new BufferedReader(InputStreamReader(System.in)); D. BufferedReader kb = new BufferedReader (new InputStreamReader (System.in)); 12. This operator performs an arithmetic or signed right shift. Which of the following is the symbol of the operator? [CLO1] A. >> B. >>> C. << D. <<< 13. Which of the following statements is correct to display Welcome to Java?[CLO2] A. System.out.println('Welcome to Java'); B. System.out.println("Welcome to Java"); C. System.println('Welcome to Java'); D. System.print('Welcome to Java'); 14. Given a java class as follows: In order to compile this program, the source code should be stored in a file _____ [CLO2] A. Test.class B. Test.java C. Test.doc D. Test.txt public class Test {}
  • 5. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 5 of 17 15. Consider the following code snippet: What would you write in order to instantiate MyClass? [CLO2] A. MyClass mc = new MyClass(); B. MyClass mc = new MyClass; C. MyClass mc = MyClass(); D. MyClass mc = MyClass; 16. Which will legally declare, construct, and initialize an array? [CLO2] A. int [] myList = {"1", "2", "3"}; B. int [] myList = (5, 8, 2); C. int myList [] [] = {4,9,7,0}; D. int myList [] = {4, 3, 7}; 17. What are the three parts of a counting loop that must be coordinated in order for the loop to work properly? [CLO2] A. Initializing the condition, changing the condition, terminating the loop. B. Initializing the counter, testing the counter, changing the counter. C. The while statement, the if statement, and sequential execution. D. The while, the assignment, and the loop body. public class MyClass{ public MyClass() { /*code*/ } }
  • 6. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 6 of 17 18. Analyze the following code: Select the best statement that describes the program [CLO3] A. The program has compile errors because the variable radius is not initialized. B. The program has a compile error because a constant PI is defined inside a method. C. The program has no compile errors but will get a runtime error because radius is not initialized. D. The program compiles and runs fine. 19. Examine the following code: What is the output? [CLO3] A. 1 2 3 4 5 6 B. 0 2 4 6 8 C. 0 2 4 6 D. 0 2 4 20. What is the difference between ‘Exception’ and ‘error’ in Java? [CLO1] A. Exception class is used for exceptional conditions that user program should catch. B. Error defines exceptions that are not excepted to be caught by the program. C. Exception and Error are the subclasses of the Throwable class. D. All of the above. public class Test { public static void main(String[] args) { double radius; final double PI= 3.15169; double area = radius * radius * PI; System.out.println("Area is " + area); } } int count = 0; while ( count <= 6 ) { System.out.print( count + " " ); count = count + 2; } System.out.println( );
  • 7. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 7 of 17 21. The following are keywords in exception handling except [CLO1] A. try B. finally C. caught D. throw 22. Choose the common exception type [CLO1] i. NullPointerException ii. NumberFormatException iii. SecurityException A. i, ii B. i, iii C. ii, iii D. i, ii, iii 23. Which is TRUE about assertion? [CLO1] A. Assertion is a mechanism used by many programming languages to describe what to do when something unexpected happen. B. Assertion is a way to test some assumption about the logic of a program. C. Assertion is a part of the program and cannot be removed independently from the program. D. All of the above. 24. What does exception type in the following program throw? [CLO2] A. ArithmeticException B. ArrayIndexOutOfBoundsException C. StringIndexOutOfBoundsException D. ClassCastException public class Test { public static void main(String[] args) { int[] list = new int[5]; System.out.println(list[5]); } }
  • 8. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 8 of 17 25. Given the following code: Which could be used to create an appropriate catch block? [CLO2] A. ClassCastException B. IllegalStateException C. NumberFormatException D. IllegalArgumentException 26. What will be the output of the following program? [CLO3] A. finally exception finished B. exception finished C. finally D. Compilation fails try { int x = Integer.parseInt(“two”); } public class Test { public static void aMethod() throws Exception { try { throw new Exception(); } finally { System.out.println(“finally”); } public static void main(String args[]) { try { aMethod(); } catch (Exception e) { System.out.println(“exception”); } System.out.println(“finished”) } }
  • 9. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 9 of 17 27. What will be the result of compiling and running the program below? [CLO3] A. Run time error B. Compile time error C. Program compiles correctly and print “A” when executed D. Program compiles correctly and prints “A” and “C” when executed 28. Which methods can access a private attribute? [CLO1] A. Only classes in the same package. B. Only static methods in the same class. C. Only those defined in the same class. D. Only instance methods in the same class. 29. Which of the following is the general scheme for a class definition? [CLO1] A. Class ClassName { // Description of the instance variables. // Description of the constructors. // Description of the methods.} B. class ClassName { // Description of the instance variables. // Description of the constructors. // Description of the methods.} C. ClassName { // Description of the instance variables. // Description of the constructors. // Description of the methods.} D. class ClassName { }; public class Exception { public static void main(String[] args){ System.out.println(“A”); try{} catch(java.io.IOException t) { System.out.println(“B”); } } }
  • 10. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 10 of 17 30. average = calculate (no1, no2, no3) What is the type of parameter passing based on the above coding. [CLO1] A. Call by value B. Call by object C. Call by parameter D. Call waiting 31. If a method assigns a new value to a member of an object which can be accessed through an object reference parameter, will this have any effect on its caller? [CLO1] A. No, because it only has a copy of the object. B. No, because it does not allow to do this. C. Yes, this will change part of the object that both it and the caller are referring to. D. Yes, the caller will now get a new object. 32. Which one of Java packages below is used for basic language functionality and fundamentals types? [CLO1] A. java.lang B. java.util C. java.math D. java.io 33. A constructor ________ [CLO1] A. must have the same name as the class it is declared within B. is used to create objects C. maybe declared private D. all of the above
  • 11. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 11 of 17 34. A String class _________________________________________ [CLO1] i. is final ii. is public iii. is serializable iv. has a constructor which takes a StringBuffer objects as an arguments A. i only B. i, ii C. i, ii, iii D. All of the above 35. Which of the following is a correct syntax for defining a new class Cupboard based on the superclass Furniture? [CLO 2] A. class Cupboard isa Furniture { //additional definitions go here } B. class Cupboard implements Furniture { //additional definitions go here } C. class Cupboard defines Furniture { //additional definitions go here } D. class Cupboard extends Furniture { //additional definitions go here } 36. Which three lines of codes are equivalent to line 3? [CLO 2] i. final int k = 4; ii. public int k = 4; iii. static int k = 4; iv. abstract int k = 4; A. i, ii, iii B. ii, iii, iv C. i, iii,iv D. All of the above public interface Foo { int k = 4; /* Line 3 */ }
  • 12. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 12 of 17 37. What is the output of the following segment program? [CLO 2] A. fa fa B. fa la C. la la D. Compilation fails 38. Consider the following coding [CLO 2] What is the output? A. 6 B. river C. 8 D. Columbia 39. Which of the following defines a legal abstract class? [CLO 3] A. abstract class Vehicle { abstract void display(); } B. class Vehicle { abstract void display(); } C. abstract Vehicle { abstract void display(); } D. class abstract Vehicle { abstract void display(); } public class Tenor extends Singer { public static String sing(){ return “fa”;} public static void main(String[] args { Tenor t = new Tenor(); Singer s = new Tenor(); System.out.println(t.sing() + “ “ + s.sing()); } } String river = new String(“Columbia”); System.out.println(river.length());
  • 13. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 13 of 17 40. Which of the statement, is NOT correct to declare an interface? [CLO 3] A. B. C. D. public interface Marker { } public interface SomethingIsWrong { voidaMethod(intaValue); } public interface SomethingIsWrong { voidaMethod(intaValue) { System.out.println("Hi Mom");} } publicRectanglePlus(Point p, int w, int h) { origin = p; width = w; height = h; }
  • 14. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 14 of 17 SECTION B STRUCTURED QUESTIONS (50 marks) INSTRUCTION: This section consists of TWO (2) structured questions. Answer ALL questions. QUESTION 1 a. Refer to Figure 1, define source program, Java compiler and Java bytecodes. [CLO1] Figure 1 : Program Flow (6 marks) b. Car is a real world object and it has its own characteristics like colour of the car, model of the car and engine capacity. We can drive the car and stop it. Draw an UML class diagram to show the attributes and the behaviors of a car. [CLO2] (7 marks) c. Based on your answer in 1(b), write a class definition for class Car by using Java. [CLO3] (7 marks) d. Write a program to accept a number from the user. Use the assert statement to determine the entered number is within the valid range between 0 and 20. [CLO3] (5 marks)
  • 15. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 15 of 17 QUESTION 2 a. Explain briefly the operators below: [CLO1] i. Conditional operator (2 marks) ii. Logical operator (2 marks) iii. Left-shift operator (2 marks) b. Write a program to get 3 values of array elements from command line with those values in the main() method. Add try and catch block to handle ArrayIndexOutOfBoundsException. [CLO2] (5 marks) c. Write a command to enable assertion when you run Java program. [CLO2] (2 marks)
  • 16. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 16 of 17 d. The class Birthday is the parent for the two new classes, YouthBirthday and AdultBirthday. Each of the new classes would ordinarily inherit the greeting() method from Birthday. YouthBirthday birthday card for young people. This card will add the line "How you have grown!" to the usual birthday greeting. An AdultBirthday birthday card is for old people. This card will add the line "You haven't changed at all!" to the usual birthday greeting. class Birthday { int age; public Birthday ( String r, int years ) { recipient = r; age = years; } public void greeting() { System.out.println("Dear " + recipient + ",n"); System.out.println("Happy " + age + "th Birthdaynn"); } } Based on the above coding,
  • 17. CONFIDENTIAL FP301 OBJECT ORIENTED PROGRAMMING Page 17 of 17 i. complete the following definition for class YouthBirthday. [CLO3] class ______(a)______ extends ________(b)_______ { public ________(c)_______ ( String r, int years ) { ____________(d)_______ ( r, years ) } public void greeting() { __________(e)___________(); System.out.println("How you have grown!!n"); } } (5 marks) ii. write a new class definition for AdultBirthday with an overriding method greeting() in it. [CLO3] (7 marks)