OOJ-CIE 1 Question Bank
OOJ-CIE 1 Question Bank
Module-2
1. Define Class, Object, Access Specifiers.
2. Explain how a class is defined with syntax and example.
3. Discuss the steps for creating and accessing an object in java for Scanner class with
an example.
4. Explain in detail how to create a method with syntax and example.
5. What are constructors? Mention the rules for creating the constructors. List their
characteristics. Explain different types of constructors in java with examples.
6. With a programming example explain the “this” keyword.
7. What is garbage collection and how does it work?
8. With a programming example explain the finalize() method in garbage collection.
9. Write a Java program to print the area of a rectangle by creating a class named 'Area'
having two methods setDim() and getArea().
10. Define a class called Graph with the following members:
Data Members: xPoint , yPoint ,type of Graph
Methods: assignType(),input (),display.
Write a Java program to create an object and use the above methods.
Lab programs
1. Implement a java program to stimulate a simple calculator using switch
statement.Theprogram must continue executing until the user presses the key 'E'.
2. Implement a java program to create a class called Student which stores USN ,name and marks
of a student .Calculate the grade according to the following criteria. Input N number of
studentdetails, find grade and print all the members.