Hyderabad Institute for Technology and Management
Sciences
Department of Computer Sciences and Related
Studies
LABMANUAL
Forthecourse
Object-Oriented Programming(CSC-212)
Instructor name:
Student Name
Student Roll No.
Program BS Software Engineering & BS Computer Science
Semester Second
Year First
Hyderabad Institute for Technology and Management
Sciences
Department of Computer Sciences and Related
Studies
VISION
To be among the leading departments of contemporary education and interdisciplinary
research that foster knowledge and innovative spirit to support digital and socio-economic
development.
MISSION
To cultivate a vibrant academic community that fosters intellectual curiosity, research
aptitude, and a commitment to applying computer science knowledge for the betterment of
digital infrastructure and the well-being of its society.
LAB MANUAL
For
CSC-212Object-Oriented Programming
Approved By HOD
Date: ____________________
Sign: ____________________
CONTENTS
Lab No. Title of Experiment Page No
Lab Rubrics
1 Practice with tools required for OOP
2 Practice with Class Diagram of HITMS and Identifying Classes and Objects.
3 Implement in Java.
LAB RUBRIC
Criteria Excellent (4) Good (3) Satisfactory (2) Needs Improvement (1)
1. Problem
Understanding
2. Code Logic /
Algorithm
3. Syntax and
Compilation
4. Use of Java
Concepts
5. Submission &
Timeliness
Total (out of 20)
LabSession1
Criterion1 Criterion2 Criterion3 Criterion4 Criterion5 Total
/20
Topic: Practice with tools required for OOP.
Aim: To familiarize students with the essential tools and environments used for Object-
Oriented Programming (OOP), including IDEs, compilers, and debugging techniques.
Objective:
By the end of this lab, students will be able to:
1. Set up and configure an OOP-compatible IDE (e.g., IntelliJ IDEA, Eclipse, PyCharm, or VS Code).
2. Write, compile, and execute a simple OOP-based program.
3. Use debugging tools to identify and fix syntax and logical errors.
LabSession2 ]
Criterion1 Criterion2 Criterion3 Criterion4 Criterion5 Total
/20
Lab Title: Practice with Class Diagram of HITMS and Identifying Classes and Objects.
Objectives.
By the end of this lab, students will be able to:
1. Identify classes, objects, attributes, and methods for a real-world system (HITMS).
2. Understand UML notation for class diagrams.
3. Model relationships (Association, Aggregation, Inheritance) between classes.
4. Practice abstraction and encapsulation in OOP design.
1. Task 1.
The Hyderabad Institute of Technology and Management Sciences (HITMS) requires a digital system to
manage its academic operations. Your task is to analyze the system requirements and design a UML Class
Diagram representing the key entities, their attributes, methods, and relationships.
2. Task 2:
Scenario:
"At HITMS, students enroll in courses taught by faculty members. Each course belongs to a department and
has a specific schedule. Students receive grades for their courses, and the university maintains records of all
enrollments."
Sub-tasks:
1. Identify all classes from the scenario (e.g., Student, Faculty, Course).
2. List key attributes for each class (e.g., studentId, facultyName).
3. Identify relationships between classes (e.g., "A Student enrolls in Courses").
Solution :
Task 1
Task2
LabSession3
Criterion1 Criterion2 Criterion3 Criterion4 Criterion5 Total
/20
Lab Title: Practice with implementation of class diagram in Java.
1. Problem Statement
Based on the Class Diagram designed in Lab 2, implement the core classes of HITMS (University Management System) in
Java. This lab focuses on translating UML design into actual Java code with proper attributes, methods, and relationships.
2. Objectives
By the end of this lab, students will be able to:
1. Convert UML class diagrams into Java classes
2. Implement proper encapsulation with private attributes and public methods
3. Establish relationships between classes (associations)
4. Create and test objects in Java
3. Lab Tasks
Task 1: Implement Core Classes
Implement the following classes with proper attributes and methods:
1. Student class with:
o Attributes: studentId, name, email
o Methods: enrollCourse(), viewGrades()
2. Course class with:
o Attributes: courseCode, title, credits
o Methods: addStudent(), displayCourseInfo()
3. Department class with:
o Attributes: deptId, name
o Methods: addFaculty(), listCourses()
Task 2: Implement Relationships
1. Create association between Student and Course:
o A Student can enroll in multiple Courses
o A Course can have multiple Students
2. Create association between Department and Course:
o A Department offers multiple Courses
Task 3: Test Your Implementation
1. Create 2 Student objects
2. Create 3 Course objects
3. Enroll students in courses
4. Display student's enrolled courses