Uploaded by Alisa Rajput

1 Assignment PAPL

advertisement
M.M. ENGINEERING COLLEGE, MULLANA (AMBALA)
DEPARTMENT OF CSE
Assignment No. 1
Branch / Semester: CSE / 3rd A
Course Name: PAPL
st
Course Code: BCSE-506
nd
Topics covered from: Unit 1 and 2 Unit starting part (up to Inheritance)
Name of Faculty: Dr. Puneet Banga, Assistant Professor (CSE)
Date of Allocation: 19.09.2022
Last date of Submission: 30.09.2022
Total Marks: 68
Assignment Outcomes:
i) Able to understand all basic features of OOPs concepts.
ii) Able to propose the use of Java in a variety of technologies on different platforms.
“All Questions are compulsory”
Q. No.
Section-A (Each question of 1 mark)
1.
Is it compulsory to use java command to get the .class file after compilation?
2.
Write short history of Java?
3.
What is the importance of main method in Java?
4.
Can we overload main method in Java?
5.
Why Java is pure Object Oriented language?
6.
What is JVM?
7.
What is the difference between a JDK and JRE?
8.
What is the usage of this keyword?
9.
What's the benefit of using inheritance?
10.
When the constructor of a class is invoked?
Section-B (Each question of 2 mark)
1.
What is Class and Object? Give suitable example.
2.
Why String class in Java is “Immutable”?
3.
Can a constructor have different name than a Class name in Java?
4.
Why do we prefer StringBuffer class in place of String class?
5.
Does return type play any role while overloading a method? Justify.
6.
equals method vs. = = operator?
7.
Constructor Overloading vs. Method Overloading?
8.
continue vs. break statement?
9.
Stack vs. Heap memory?
10.
Explain usage of super and final keywords in java with the help of example.
Marks
10
20
Section-C (Each question of 4 mark)
1.
Explain Java’s Data types in detail with suitable code example?
2.
WAP to add two matrices having three rows and two columns using Array?
3.
What is Compile time polymorphism? How do we achieve in Java, explain with example.
4.
What is the benefit of Inheritance? WAP to achieve Single Inheritance?
5
Write a short note on Conway’s Game of Life and its benefits.
Section-D (Each question of 6 mark)
1.
20
18
What is the difference between Object Oriented Programming and Object Based Programming?
Explain at least six important features of Java in detail.
2.
Explain Java’s Conditional constructs with code examples in detail.
3.
What is the need of Constructor? Explain their types and its overloading in detail with code examples.
********************************************************************************************************
NOTE: “WRITE CODE WHENEVEN ITS REQUIRED AS AN EXAMPLE FOR BETTER CLARITY”
Students are required to submit handwritten solutions of given assignment on or before Last date of submission
otherwise penalty in terms of deduction in marks will be made as per following rule:
If submitted on or before last date then Deduction of marks =
0
If submission delayed by (1-7) days then Deduction of marks =
5
If submission delayed by (8-14) days then Deduction of marks =
10
If submission delayed by more than 15 days then Deduction of marks = 12.5
********************************************************************************************************
PAPL TEACHER: DR. PUNEET BANGA (3 CSE-A)
Download