SlideShare a Scribd company logo
1 of 17
Download to read offline
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

Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)
Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)
Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)Khairi Aiman
 
Soalan excel bahagian 1
Soalan excel bahagian 1Soalan excel bahagian 1
Soalan excel bahagian 1Anuar Sulaiman
 
Pentaksiran Tingkatan 1 Bahasa Inggeris (Answer)
Pentaksiran Tingkatan 1 Bahasa Inggeris (Answer)Pentaksiran Tingkatan 1 Bahasa Inggeris (Answer)
Pentaksiran Tingkatan 1 Bahasa Inggeris (Answer)Miz Malinz
 
FP 303 COMPUTER NETWORK PAPER FINAL
FP 303 COMPUTER NETWORK PAPER FINALFP 303 COMPUTER NETWORK PAPER FINAL
FP 303 COMPUTER NETWORK PAPER FINALSyahriha Ruslan
 
Soalan Sejarah Tahun 5 PKSR 1
Soalan Sejarah Tahun 5 PKSR 1Soalan Sejarah Tahun 5 PKSR 1
Soalan Sejarah Tahun 5 PKSR 1cik matahariku
 
Creative problem solving
Creative problem solvingCreative problem solving
Creative problem solvingAsrul Majid
 
Matematik soalan kertas 1
Matematik soalan kertas 1Matematik soalan kertas 1
Matematik soalan kertas 1coxxiee
 
Movie ticket booking
Movie ticket bookingMovie ticket booking
Movie ticket bookingRutul Dave
 
mid term mathematics exam form 1
mid term mathematics exam form 1mid term mathematics exam form 1
mid term mathematics exam form 1Roszaimah Soriadi
 
Presentasi TIK kelas IX Bab 1
Presentasi TIK kelas IX Bab 1Presentasi TIK kelas IX Bab 1
Presentasi TIK kelas IX Bab 1talita nabilla
 
Modul pembelajaran 3d studio max
Modul pembelajaran 3d studio maxModul pembelajaran 3d studio max
Modul pembelajaran 3d studio maxUPSI
 
MOBILE DEVICE CONFIGURATION
MOBILE DEVICE CONFIGURATION MOBILE DEVICE CONFIGURATION
MOBILE DEVICE CONFIGURATION diddy98
 
Uml package diagram
Uml package  diagramUml package  diagram
Uml package diagramVedaraj M
 
T4 BAB 9 KIMIA INDUSTRI (ULANGKAJI).pptx
T4 BAB 9 KIMIA INDUSTRI (ULANGKAJI).pptxT4 BAB 9 KIMIA INDUSTRI (ULANGKAJI).pptx
T4 BAB 9 KIMIA INDUSTRI (ULANGKAJI).pptxRuziahAhmad1
 
Modul Microsoft Excel Dasar
Modul Microsoft Excel DasarModul Microsoft Excel Dasar
Modul Microsoft Excel DasarWahid Al Faranby
 
Teknik Menjawab Kertas 2 BM SPM (Rumusan dan Pemahaman)
Teknik Menjawab Kertas 2 BM SPM (Rumusan dan Pemahaman)Teknik Menjawab Kertas 2 BM SPM (Rumusan dan Pemahaman)
Teknik Menjawab Kertas 2 BM SPM (Rumusan dan Pemahaman)Kementerian Pelajaran Malaysia
 
Final Year Project Report Example
Final Year Project Report ExampleFinal Year Project Report Example
Final Year Project Report ExampleMuhd Mu'izuddin
 

What's hot (20)

Modul Microsoft Excel
Modul Microsoft ExcelModul Microsoft Excel
Modul Microsoft Excel
 
Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)
Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)
Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)
 
Soalan excel bahagian 1
Soalan excel bahagian 1Soalan excel bahagian 1
Soalan excel bahagian 1
 
Pentaksiran Tingkatan 1 Bahasa Inggeris (Answer)
Pentaksiran Tingkatan 1 Bahasa Inggeris (Answer)Pentaksiran Tingkatan 1 Bahasa Inggeris (Answer)
Pentaksiran Tingkatan 1 Bahasa Inggeris (Answer)
 
FP 303 COMPUTER NETWORK PAPER FINAL
FP 303 COMPUTER NETWORK PAPER FINALFP 303 COMPUTER NETWORK PAPER FINAL
FP 303 COMPUTER NETWORK PAPER FINAL
 
Soalan Sejarah Tahun 5 PKSR 1
Soalan Sejarah Tahun 5 PKSR 1Soalan Sejarah Tahun 5 PKSR 1
Soalan Sejarah Tahun 5 PKSR 1
 
Creative problem solving
Creative problem solvingCreative problem solving
Creative problem solving
 
Matematik soalan kertas 1
Matematik soalan kertas 1Matematik soalan kertas 1
Matematik soalan kertas 1
 
Movie ticket booking
Movie ticket bookingMovie ticket booking
Movie ticket booking
 
mid term mathematics exam form 1
mid term mathematics exam form 1mid term mathematics exam form 1
mid term mathematics exam form 1
 
Presentasi TIK kelas IX Bab 1
Presentasi TIK kelas IX Bab 1Presentasi TIK kelas IX Bab 1
Presentasi TIK kelas IX Bab 1
 
Modul pembelajaran 3d studio max
Modul pembelajaran 3d studio maxModul pembelajaran 3d studio max
Modul pembelajaran 3d studio max
 
MOBILE DEVICE CONFIGURATION
MOBILE DEVICE CONFIGURATION MOBILE DEVICE CONFIGURATION
MOBILE DEVICE CONFIGURATION
 
Uml package diagram
Uml package  diagramUml package  diagram
Uml package diagram
 
T4 BAB 9 KIMIA INDUSTRI (ULANGKAJI).pptx
T4 BAB 9 KIMIA INDUSTRI (ULANGKAJI).pptxT4 BAB 9 KIMIA INDUSTRI (ULANGKAJI).pptx
T4 BAB 9 KIMIA INDUSTRI (ULANGKAJI).pptx
 
Ppt sains tingkatan 1
Ppt sains tingkatan 1Ppt sains tingkatan 1
Ppt sains tingkatan 1
 
Dbms lab Manual
Dbms lab ManualDbms lab Manual
Dbms lab Manual
 
Modul Microsoft Excel Dasar
Modul Microsoft Excel DasarModul Microsoft Excel Dasar
Modul Microsoft Excel Dasar
 
Teknik Menjawab Kertas 2 BM SPM (Rumusan dan Pemahaman)
Teknik Menjawab Kertas 2 BM SPM (Rumusan dan Pemahaman)Teknik Menjawab Kertas 2 BM SPM (Rumusan dan Pemahaman)
Teknik Menjawab Kertas 2 BM SPM (Rumusan dan Pemahaman)
 
Final Year Project Report Example
Final Year Project Report ExampleFinal Year Project Report Example
Final Year Project Report Example
 

Viewers also liked

FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3Syahriha Ruslan
 
Problem Based Task 1
Problem Based Task 1Problem Based Task 1
Problem Based Task 1rozimm78
 
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 2012Syahriha 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 FullManas Rai
 
Final paper FN511 Switching & Routing
Final paper FN511 Switching & RoutingFinal paper FN511 Switching & Routing
Final paper FN511 Switching & RoutingAmira 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 QSyahriha Ruslan
 
Final exam review answer(networking)
Final exam review answer(networking)Final exam review answer(networking)
Final exam review answer(networking)welcometofacebook
 
Final paper FN512 server management
Final paper FN512 server managementFinal paper FN512 server management
Final paper FN512 server managementAmira Dolce Farhana
 
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 MethodsAtit 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 SolutionsFelipe Suarez
 
Roadmap iDBMS (sebelum ambil alih)
Roadmap iDBMS (sebelum ambil alih)Roadmap iDBMS (sebelum ambil alih)
Roadmap iDBMS (sebelum ambil alih)Kolej Komuniti
 
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
 
Subnet questions with ans(networking)
Subnet questions with ans(networking)Subnet questions with ans(networking)
Subnet questions with ans(networking)welcometofacebook
 
Data structures and algorithms made easy
Data structures and algorithms made easyData structures and algorithms made easy
Data structures and algorithms made easyCareerMonk Publications
 

Viewers also liked (20)

FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3
 
Problem Based Task 1
Problem Based Task 1Problem Based Task 1
Problem Based Task 1
 
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)
 
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
 
Subnet questions with ans(networking)
Subnet questions with ans(networking)Subnet questions with ans(networking)
Subnet questions with ans(networking)
 
Data structures and algorithms made easy
Data structures and algorithms made easyData structures and algorithms made easy
Data structures and algorithms made easy
 

Similar to FP 301 OOP FINAL PAPER JUNE 2013

Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docxrosemarybdodson23141
 
Fp304 DATABASE SYSTEM JUNE 2012
Fp304   DATABASE SYSTEM JUNE 2012Fp304   DATABASE SYSTEM JUNE 2012
Fp304 DATABASE SYSTEM JUNE 2012Syahriha Ruslan
 
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).docAnimutGeremew3
 
classes object fgfhdfgfdgfgfgfgfdoop.pptx
classes object  fgfhdfgfdgfgfgfgfdoop.pptxclasses object  fgfhdfgfdgfgfgfgfdoop.pptx
classes object fgfhdfgfdgfgfgfgfdoop.pptxarjun431527
 
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 programmingsoni_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 2019ktuonlinenotes
 
Technical aptitude Test 1 CSE
Technical aptitude Test 1 CSETechnical aptitude Test 1 CSE
Technical aptitude Test 1 CSESujata Regoti
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSESujata 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 - 2Knowledge 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 & DestructorsDudy Ali
 
Introduction To Computers And Problem Solving
Introduction To Computers And Problem SolvingIntroduction To Computers And Problem Solving
Introduction To Computers And Problem SolvingKaren Gilchrist
 
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-slidesSami Mut
 

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
 
Introduction To Computers And Problem Solving
Introduction To Computers And Problem SolvingIntroduction To Computers And Problem Solving
Introduction To Computers And Problem Solving
 
SOFTWARE ENGINEERING.pdf
SOFTWARE ENGINEERING.pdfSOFTWARE ENGINEERING.pdf
SOFTWARE ENGINEERING.pdf
 
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
 

Recently uploaded

Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl
 
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTSIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTxtailishbaloch
 
LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0DanBrown980551
 
UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4DianaGray10
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...DianaGray10
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTopCSSGallery
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)codyslingerland1
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingFrancesco Corti
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Alkin Tezuysal
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024Brian Pichman
 
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through TokenizationStobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through TokenizationStobox
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3DianaGray10
 
Oracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxOracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxSatishbabu Gunukula
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarThousandEyes
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Libraryshyamraj55
 
Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfInfopole1
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNeo4j
 
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptxEmil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptxNeo4j
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdfThe Good Food Institute
 

Recently uploaded (20)

Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile Brochure
 
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTSIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
 
LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0
 
UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development Companies
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is going
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024
 
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through TokenizationStobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3
 
Oracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxOracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptx
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? Webinar
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Library
 
Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdf
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4j
 
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptxEmil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf
 

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)