MALLA REDDY ENGINEERING COLLEGE FOR WOMEN
Autonomous Institution-UGC, Govt. of India
Accredited by NAAC with‘A+’ Grade, UGC, Govt.of India | Programmes Accredited by NBA
National Ranking by NIRF Innovation-Rank band(151-300),MHRD,Govt. of India
Approved by AICTE, Affiliated to JNTUH,ISO 9001-2015 Certified Institution
COURSE: II B.TECH SUBJECT: OOPS through
DEPARTMENT: CSE F
I SEM Java
UNIT – 1 R2 REGULATION 2025-2026
TUTORIAL SHEET-1
Sno Question CO PO BTL
1 Create a Java program to merge two sorted arrays into a single Create
sorted array (ascending order).
2 Design a Java program that reads 10 student marks and: Create
Calculates the class average
Lists students above and below average
3 Take a sentence from the user Apply
Count the number of vowels, consonants, digits, and spaces
4 Implement a program to check if two strings are equal (case- Apply
insensitive), without using equals() method.
5 Develop a program to check whether a given string is a Apply
palindrome, ignoring cases and special characters.
Signature of Faculty: Signature of HOD:
MALLA REDDY ENGINEERING COLLEGE FOR WOMEN
Autonomous Institution-UGC, Govt. of India
Accredited by NAAC with‘A+’ Grade, UGC, Govt.of India | Programmes Accredited by NBA
National Ranking by NIRF Innovation-Rank band(151-300),MHRD,Govt. of India
Approved by AICTE, Affiliated to JNTUH,ISO 9001-2015 Certified Institution
COURSE: II B.TECH SUBJECT: OOPS through
DEPARTMENT: CSE F
I SEM Java
UNIT – 1I R2 REGULATION 2025-2026
TUTORIAL SHEET-2
Sno Question CO PO BTL
1 Identify the issue and model: Analyze
How does final prevent inheritance?
Can we make a method final but still allow class
inheritance?
2 Create two classes Person and Student. Student should Create
extend Person, and use super() to call the parent class
constructor.
3 Create a package named shapes, and define a class Circle in it Create
with protected and public methods.
4 Develop a class Calculator with overloaded methods add(int a, Apply
int b) and add(double a, double b).
5 Design a Library System using Inheritance Apply
Design:
Base class: Item
Subclasses: Book, Magazine
Include method overriding and use super() in
constructors.
Signature of Faculty: Signature of HOD:
MALLA REDDY ENGINEERING COLLEGE FOR WOMEN
Autonomous Institution-UGC, Govt. of India
Accredited by NAAC with‘A+’ Grade, UGC, Govt.of India | Programmes Accredited by NBA
National Ranking by NIRF Innovation-Rank band(151-300),MHRD,Govt. of India
Approved by AICTE, Affiliated to JNTUH,ISO 9001-2015 Certified Institution
COURSE: II B.TECH SUBJECT: OOPS through
DEPARTMENT: CSE F
I SEM Java
UNIT – 1II R2 REGULATION 2025-2026
TUTORIAL SHEET-3
Sno Question CO PO BTL
1 What will happen in the following scenario? Explain your Analyze
answer:
A thread is sleeping and receives interrupt().
A thread throws an exception inside the run() method.
A finally block throws an exception — will the earlier
exception be suppressed or replaced?
2 Develop a program that demonstrates: Apply
Division by zero exception
Use of try-catch-finally to handle it gracefully
3 Implement a program to: Apply
Create and start two threads using the Runnable interface
Assign different priorities to each thread
Observe the output and comment on thread scheduling
4 Develop a Java program to: Apply
Define your own exception class called AgeException
Throw the exception if the user enters an age less than 18
Catch and display a custom message
5 Develop a Java program using Thread class: Apply
Create a class MyThread extending Thread
Override the run() method to print numbers 1 to 5
Create two threads from main and start them
Signature of Faculty: Signature of HOD:
MALLA REDDY ENGINEERING COLLEGE FOR WOMEN
Autonomous Institution-UGC, Govt. of India
Accredited by NAAC with‘A+’ Grade, UGC, Govt.of India | Programmes Accredited by NBA
National Ranking by NIRF Innovation-Rank band(151-300),MHRD,Govt. of India
Approved by AICTE, Affiliated to JNTUH,ISO 9001-2015 Certified Institution
COURSE: II B.TECH SUBJECT: OOPS through
DEPARTMENT: CSE F
I SEM Java
UNIT – 1V R2 REGULATION 2025-2026
TUTORIAL SHEET-4
Sno Question CO PO BTL
1 Implement a program to: Apply
Create an ArrayList of 5 integers
Iterate using enhanced for loop and print square of each
element
2 Model to describe the role of the following utility classes Analyze
with example use cases:
Scanner
StringTokenizer
Random
Date
3 Develop a Java program to: Apply
Accept 10 names from the user using Scanner
Store them in a TreeSet
Display names in alphabetical order
4 Which is faster: ArrayList or LinkedList when adding elements Analyze
at the beginning? Justify your answer with a sample code and
output.
5 Create a file and write your name, branch, and year using Create
FileWriter
Signature of Faculty: Signature of HOD:
MALLA REDDY ENGINEERING COLLEGE FOR WOMEN
Autonomous Institution-UGC, Govt. of India
Accredited by NAAC with‘A+’ Grade, UGC, Govt.of India | Programmes Accredited by NBA
National Ranking by NIRF Innovation-Rank band(151-300),MHRD,Govt. of India
Approved by AICTE, Affiliated to JNTUH,ISO 9001-2015 Certified Institution
COURSE: II B.TECH SUBJECT: OOPS through
DEPARTMENT: CSE F
I SEM Java
UNIT – V R2 REGULATION 2025-2026
TUTORIAL SHEET-5
Sno Question CO PO BTL
1 Design a simple calculator using Swing with the following: Apply
Two JTextFields for input
Buttons for +, −, ×, ÷
Result shown in a JLabel
2 Develop a Java Applet to display your name, roll number, Apply
and branch. Pass these values as parameters from HTML.
3 Develop a Swing application that: Apply
Accepts a student's name and age using JTextField
Displays the details on a JLabel when a JButton is clicked
4 Why Swing is preferred over AWT in most modern GUI Analyze
applications.
What are the problems with heavyweight components in AWT?
5 Create your own implementation of init(), start(), stop(), Create
destroy(), and paint() methods.
Signature of Faculty: Signature of HOD: