CSE(Gr C)/5th Sem/PCC-CS503 2024
SILIGURI INSTITUTE OF TECHNOLOGY
ASSIGNMENT-II
Paper Name: Object Oriented Programming.
Paper Code: PCC-CS503
Submission Date: 14th September, 2024
Assignment policy:
Write the assignment in A4 sheet along with student name, rollno, subject, sem and
department-sec, then make a pdf as [Link] format and submit in the following link with
in the above mentioned date:
Link: [Link]
usp=sharing
Each question will carry equal marks.
No late submissions will be allowed.
Answer all questions (5X5=25)
1. Write down different features of Object oriented programming language?
What are the differences procedural oriented programming and Object oriented
programming language? What is JVM? Why java is called platform independent
language?
2. What is inheritance in OOP? Describe the different forms of inheritance with suitable
diagrams? When do we declare a member of a class as static? (Explain with proper
example.) Write the utility of this keyword.
.
3. What do you mean by polymorphism?Create a base class Calculation containing two
methods by name add() and sub()to perform addition and subtraction. Create a
subclass My_Calculation and create object of that class .Using add() and sub() methods
calculate the value of the expression (A+B) * (C-D) through subclass object.
4. Write a Java program using method overloading to calculate the area of a triangle
( consider both equilateral and right-angle) for two given set of values. Define
constructor and methods as per requirement.
5. Define constructor? Write the difference between method and constructor?
Write a Java program which will create a class fact which contain a static method
factorial( ) to calculate factorial( ) recursively.