Section A: Objective: DATED: 23 November, 2012
Section A: Objective: DATED: 23 November, 2012
1
a. 5
b. 4
c. 3
d. 1
(10) Full form of DFD is
a. Data Flow Diagram
b. Data Flow Definition
c. Diagram Flow of Data
d. None Of These
(11) A remote control that is used to turn on or off some machine is also called a(n) _____.
a. class
b. interface
c. message
d. instance
(12) In a student grading system, Student Last Name, Student Address, and Final Course Grade would
all be classified as what?
a. Inheritance
b. Information
c. Encapsulation
d. Polymorphism
(13) What part of object-oriented technology defines superclass and subclass relationships?
a. Inheritance
b. Scalability
c. Encapsulation
d. Polymorphism
(14) In a student grading system, objects from different classes communicate with each other. These
communications are known as _____.
a. inheritance
b. polymorphism
c. messages
d. concealment
(15) When an object has many forms, it has _____.
a. Inheritance
b. Scalability
c. Encapsulation
d. Polymorphism
(16) What term is used to describe the internal representation of an object that is hidden from view
outside the object's definition?
a. Encapsulation
b. Expandable
c. Polymorphism
d. Inheritance
(17) What programming language model is organized around "objects" rather than "actions"?
a. Java
b. OOB
c. Perl
d. C+
(18) What are the instructions called that tell a system what, how, and when to do something?
a. Object-oriented technology approach
b. Object-oriented database
c. Program
d. Database management
(19) What common technique attempts to save time and energy by reducing redundant work in object-
oriented programming?
a. Reduce lines of programming
2
b. Reuse of code
c. Reduce size of systems being developed
d. Merging different systems together
(20) What kind of programming language is Java?
a. Object-oriented programming language
b. Relational programming language
c. Sixth-generation programming language
d. Database management programming language
(21)
public class Loop {
public static void main(String[] args) {
Integer a=012,b;
for(b=0;b<=a;b++);
System.out.print(b);
}
}
What will be the output of above java program?
(a)10
(b)11
(c)12
(d) Compiler error
(22)
public class Loop {
public static void main(String[] args){
int b=0;
do{
int a=2;
b++;
System.out.println(a++);
}
while(b!=3);
}
}
What will be the output of above java program?
(a)2
2
2
(b)3
3
3
(c)3
4
5
(d) Declaration is not allowed here, Compiler error
(23)
public class Loop {
public static void main(String[] args){
for(int a=0,b=0;a+b<5;a++,++b){
System.out.print(a^b);
}
}
}
What will be the output of above java program?
(a)111
3
(b)000
(c)1111
(d)Compiler error
(24)
public class Loop {
public static void main(String[] args){
int i=0;
for(;i<4;i++){
System.out.println(i<2);
}
}
}
(a)Infinite loop
(b) true
false
false
false
(c) true
true
false
false
(d)Compiler error
(25)
public class Loop {
public static void main(String[] args){
int i=0;
for(i++;i<4;i++){
System.out.println(~i);
} }
}
What will be the output of above java program?
(a)-1
-3
(b)-2
(c)-2
-3
-4
1. a 13. a
(d)Compiler error
2. b 14. c
ANSWER KEY (OOPs+JAVA TCS: 304)
3. c 15. d
4. a 16. a
5. b 17. b
6. d 18. c
7. b 19. b
8. a 20. a
4
9. c 21. b
10. a 22. a
Section B: Subjective
1. Describe OMT methodology in brief.
2. Differentiate between SA/SD and JSD methodologies.
3. Write short note on Functional modeling
4. Briefly describe how Object Oriented techniques can be applied in other areas like language design and
hardware design.
5. Prepare a Data Flow Diagram for computing the mean of a sequence of input values. A separate control
input is provided to reset the computation. Each time a new value is input, the mean of all values input since
the last reset command should be output.
6. What is JVM. Explain in detail along with structure.
7. What is encapsulation? Explain with the help of an example using JAVA.
8. Discuss the benefits and applications of OOP in detail.Differentiate between object-based and object-
oriented programming languages.
9. What are constraints? Explain in context of object modeling
10. Differentiate between aggregation and generalization by taking suitable example
11. What is a state diagram? Prepare a state diagram for a programmable thermostat
12. Describe the concept of candidate key by taking suitable example
13. Prepare a class diagram from instance diagram given below :