SY - Core Java - Syllabus-Nep
SY - Core Java - Syllabus-Nep
Java Programming
Lab SEMESTER –
IV
Course Code: 23CSE2007 Course Credits: 2
Course Outcomes:
At the end of the course students will be able to:
1. Understand the fundamental concepts and features of Java programming language.
2. Demonstrate proficiency in designing and implementing classes, objects, and methods in
Java.
3. Apply object-oriented programming principles such as encapsulation, inheritance, and
polymorphism in Java programs.
4. Utilize exception handling mechanisms to manage errors and unexpected situations in
Java applications effectively.
5. Implement multithreading and file handling techniques for concurrent execution and
data management in Java programs.
MIT School of Computing
Course Contents
UNIT I Introduction to Java
Introduction to Java: Importance and features of Java, Concepts of Java Virtual machine (JVM) ,
JDK, JRE, Keywords, Constants, Variables and data types, operators and expressions, Control
statements, Conditional statements, loops, and iterations,
Concept of class: Class definition, adding variables and methods, creating objects, constructors,
defining methods, calling methods, Arrays, String Handling in Java ( String, StringBuffer classes)
Memory Allocation: ‘new’, Memory Recovery: ‘delete’, Static Data Members, Static Methods,
Forward Declaration, Classes as Objects.
Pedagogy ICT Teaching / Power Point Presentation and Videos:
Self-study / Do it yourself:
Experiential Learning Topics:
Case Study / PBL - Project Based Learning:
UNIT Object-Oriented Programming (OOP)
II
Input/Output Exploring java.io: Bufferreader, Wrapper classes, Scanner Class: Scanner class
methods(next(),nextLine() etc.
Object-Oriented Programming: Objects, Classes, Data Members, Methods, Messages, Data
Encapsulation, Data Abstraction and Information Hiding,
Constructors and Methods: Introduction, Use of Constructor, Characteristics of Constructors,
Types of Constructors, Constructor Overloading, Dynamic Initialization of an Object, Constructor
with Default Arguments, Symbolic Constants, Finalizers, Static and non-static method
Pedagogy ICT Teaching / Power Point Presentation and Videos:
Self-study / Do it yourself:
Experiential Learning Topics:
Case Study / PBL - Project Based Learning:
UNIT INHERITANCE, Package and Interface
III
Introduction of Inheritance: Need of Inheritance, Access specifier, Types of Inheritance, Benefits
of Inheritance, Cost of Inheritance, Constructors in Derived Classes, Method Overriding, Abstract
Classes and Interfaces, Polymorphism and Types of Polymorphism, Mechanisms for Software
Reuse, Efficiency and Polymorphism
Package: Built in Package and User define package, creating package, importing a package, Using
Packages, import and static import, Access protection, Example of package.
Interface: Defining Interfaces, abstract methods declarations, implementing interfaces, extended
interfaces, interface references.
UML Class Diagram: Class Diagram, Usage of Class diagrams
MIT School of Computing
Pedagogy ICT Teaching / Power Point Presentation and Videos:
Self-study / Do it yourself:
Experiential Learning Topics:
Case Study / PBL - Project Based Learning:
UNIT IV Exception and File Handling, Multithreading
Exception: Errors, Types of Errors, Exception and its Types, Exception-Handling Fundamentals,
Uncaught Exception, Using try and Catch, Multiple Catch Clauses, Nested Try Statements, User
Defined Exception using Throw.
Introduction to File Handling: Overview of file handling in Java, Importance of file handling in
applications, Introduction to java.io package, Reading from Files, Writing to Files, Character Streams,
Byte Streams, Random Access Files, File Navigation and Information
Multithreading: Java thread model, synchronization, messaging, thread class, Runnable interface,
inter thread communication, Producer/ consumer problems, Wait () and notify ().
Pedagogy ICT Teaching / Power Point Presentation and Videos:
Self-study / Do it yourself:
Experiential Learning Topics:
Case Study / PBL - Project Based Learning:
MIT School of
Computing
Sr. Name of C
No. Experiment/Assignment O
1 C
0. Write a Java program that reads an integer between 0 and 1000 and adds O
all the digits in the integer. 1
3 0. Write a java program to create a class Student with data „name, city and co
age‟ along with method addData and printData to input and display the data. 1
Create the two objects s1 ,s2 to declare and access the values. ( CLASS AND
OBJECT)
Write a Java program that creates a class hierarchy for employees of a company. The
4 base class should be Employee, with subclasses Manager, Developer, and Programmer. C
Each subclass should have properties such as name, address, salary, and job title. O
Implement methods for calculating bonuses, generating performance reports, and 2
managing projects.(ENCAPSULATION )
Write a java program to create an abstract class named Shape that contains two integers
and an empty method named print Area (). Provide three classes named Rectangle,
5 C
Triangle and Circle such that each one of the classes extends the class Shape. Each one
O
of the classes contains only the method print Area () that prints the area of the given
2
shape ( ABSTRACT CLASS)
Write a Java program to create a class called Circle with a private instance variable
7 radius. Provide public getter and setter methods to access and modify the radius C
variable. However, provide two methods called calculateArea() and O
calculatePerimeter() that return the calculated area and perimeter based on the 3
current radius value.(INHERITANCE )
Write a Java program to create a base class Animal with methods move() and
8 makeSound(). Create two subclasses Bird and Panthera. Override the move() method C
in each subclass to describe how each animal moves. Also, override the makeSound() O
method in each subclass to make a specific sound for each animal. 4
(POLYMORPHISM )
Write a Java program that reads a list of numbers from a file and throws an exception
9 if any of the numbers are positive. (EXCEPTION HANDLING) C
O
4
0. Write a Java program to remove the third element from an array list.
10 0. Write a Java program to insert the specified element at the specified
C
position in the linked list. O
A. Write a Java program to get the number of elements in a hash set. 5
(COLLECTION OF FRAMEWORK)
MIT School of Computing
1 CO
1 5