0% found this document useful (0 votes)
2 views1 page

Module 2 Assignment

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Module 2 Assignment

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

NAVODAYA INSTITUTE OF TECHNOLOGY, RAICHUR

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


MODULE-2 ASSIGNMENT QUESTIONS

1. What are constructors? Explain two types of constructors with an example program.
2. Define recursion. Write a recursive program to find nth Fibonacci number.
3. Explain the various access specifiers in Java.
4. Explain call by value and call by reference with an example program
5. Write a program to perform Stack operations using proper class and Methods.
6. Explain the use of this in JAVA with an example.
7. Develop a Java Program to find Area of Rectangle, Area of Circle and Area of Triangle using method
Overloading Concept. Call these methods from the main method using suitable inputs.
8. Interpret the general Form of a class with suitable examples.
9. Outline the following Keywords with an example
(i) this
(ii) static
10.A class called Employee, which models an employee with an ID, name and salary, is designed as shown in the
following class diagram. The method raise Salary (percent) increases the salary by the given percentage. Develop
the Employee class and suitable main method for demonstration.

You might also like