Object Oriented Programming Using Java
Mid Semester Examination, 2021-22
B. Tech - Semester : 03
Time : 1.30 hrs. - Max. Marks : 40
Instructions:
- All questions are Compulsory
- Assume missing data suitably, if any.
Section : A ( 2 x 2 = 4 Marks )
All questions are compulsory
- What are the main characteristics of OOPs ?
- Demonstrate a program in java to check whether the number is palindrome is not.
Section : B ( 4 x 2 = 8 Marks )
All questions are compulsory
- Demonstrate a program in java which displays the squares of the first ten integers.
- Define various features of java with proper example.
Section : C ( 6 x 2 = 12 Marks )
All questions are compulsory
- Construct a class Bank where data will be Account no, customers name and balance. Use display() method to print all the information of particular customer whose balance is less than 5000.ORIdentify the usage of garbage collector ? When does an object become eligible garbage collector ? Explain with example.
- Build a program in java to do the following:
i. To swap the two numbers without using the third variable.
ii. Factorial of a number.ORExplain and elaborate the architecture of JVM using neat diagram.
Section : D ( 8 x 2 = 16 Marks )
All questions are compulsory
- Build a program to display odd and even numbers from 1 to n where n = 100 using class and object concept.ORIdentify basic arithmetic and relational operators in java with the help of a program.
- Create a program that consider the three numbers and prints "increasing" if the number are in increasing order, "decreasing" if the number are in decreasing order, and "Neither increasing or decreasing order" otherwise.
Test Data
Input first number: 1524
Input second number: 2345
Input third number: 3321
Expected Output : Increasing OrderORCreate a program in java with class student with the data fields name, roll_no, and fees. The type of name, roll_no and fees are String, String and Double respectively. The methods are get_detail() and display_detail(). Also define default and parameterized constructor and display the detail of both students.
*******************
No comments:
Post a Comment