Uttaranchal Institute of Technology, Dehradun, Uttarakhand
Department of Computer Science & Engineering
Instructions:
ANSWER NEATLY AND LEGIBLY on A4 sheets if available.
Sketch diagrams wherever relevant. Explain your notations explicitly and clearly.
An incomplete assignment is NOT acceptable for submission.
Once you submit your assignment, you will be expected to answer all the questions there
INDEPENDENTLY.
Page number your answer sheets sequentially.
On the top of your fist sheet, write your Name, Year, Section, and Roll Number.
Assignment – 1
Class: B. Tech (3rd Sem)
Subject: Programming with core JAVA (TCS-202) Max Marks-20
Last date of Submission: 0 5 / 0 9 /2025
Sr. No. Question CO
1. What are the main principles of Object-Oriented Programming in CO – 1
Java? How does OOP differ from Procedural Programming?
2. Define class and object with an example in Java. How do you CO – 1
create an object of a class in Java? Give syntax.
3. Write a simple Java program to create a class Car with attributes and CO – 1
display details of its objects.
4. What is encapsulation in Java? How do getter and setter methods CO – 1
implement encapsulation?
5. Discuss Access Specifier with example. CO – 1
6. What is a constructor in Java and how is it different from a CO – 1
method? Write a program to demonstrate constructor
overloading.
7. Case Study: Student Details Program
Problem: A college wants to maintain student records.
Task: Create a Student class with data members like name, roll number,
and course. Create methods to input and display student details.
Concepts Used: Class, objects, methods, constructors, access
specifiers.