Oop With Java - 44t+44l
Oop With Java - 44t+44l
Objective: To reinforce knowledge of Object Oriented Programming concepts using Core Java.
Text Book:
Core and Advanced Java Black Book / Dreamtech Press
References:
Java 8 Programming Black Book / Dreamtech Press
Core Java : Volume 1 - Fundamentals by Cay S. Horstmann / Prentice Hall
Core Java : Volume 2 - Advanced Features by Cay S. Horstmann / Prentice Hall
Programming in Java by Sachin Malhotra, Saurabh Choudhary / Oxford University Press
Java The Complete Reference by Herbert Schildt / McGraw Hill
Core Java 8 for Beginners by Sharanam Shah, Vaishali Shah / Shroff Publishers
Murach’s Java Programming by Joel Murach / Mike Murach
Object-Oriented Analysis and Design with applications by Grady Booch / Pearson
Object-Oriented Analysis and Design Using UML - An Introduction to Unified Process and Design
Patterns by Mahesh P. Matha / PHI
Session 1:
Lecture:
Introduction to java
Features of java
JVM Architecture
JDK and its usage
Structure of java class
Working with data types: Primitive data types
Session 2:
Lecture:
Operators
Unary, binary, Arithmetic, Assignment, compound, relational, logical, equality
Control statements
if-else-if, switch, ternary operator, for loop, while loop, do-while loop
Declaring variables and methods
Data type compatibility
Lab:
Get yourself acquainted with java environment.
Print different patterns of asterisk (*) using loops (e.g. triangle of *).
Tutorial:
Compare syntactical similarities and dissimilarities between Java and C++.
Session 3:
Lecture:
Static variables and methods
Accessing static variables and methods of different class
Introduction to reference data types
Reference variables and methods
Difference between reference data types and primitive data types
Difference between reference variable and static variable
Session 4:
Lecture:
Constructors, initializing reference variables using constructors
Pass by value v/s pass by reference
Re-assigning a reference variable
Passing reference variable to method
Initializing reference variable of different class
Heap memory and stack memory
Lab:
Print default values of static & instance variables for different data types.
Build a class Employee which contains details about the employee and compile and run its instance.
Build a class which has references to other classes. Instantiate these reference variables and invoke
instance methods.
Tutorial:
Understand role of stack and heap memory in method invocation and object creation.
Session 6:
Lecture:
Inheritance: Hierarchical
Polymorphism: Compile time and runtime polymorphism
Rules of overriding and overloading of methods
super and this keywords
Upcasting & downcasting of a reference variable
Lab:
Create a class Employee and encapsulate the data members.
Create demo applications to illustrate different types of inheritance.
Session 7:
Lecture:
Abstract class and abstract methods
Interface (implementing multiple interfaces)
Session 8:
Lecture:
Final variables, final methods and final class
Functional interface
New interface features (Java 8 & above)
Arrays
Enumerations
Lab:
Create an Array of Employee class and initialize array elements with different employee objects.
Try to understand the no of objects on heap memory when any array is created.
Session 9:
Lecture:
Access modifiers (public, private, protected and default)
Packages and import statements
Static imports
Constructor chaining (with and without packages)
Accessing protected variables and methods outside the package
Session 10:
Lecture:
Garbage collection in java
Requesting JVM to run garbage collection
Different ways to make object eligible for garbage collection: (Nulling a reference variable, Re-assigning
a reference variable & island of isolation)
Finalize method
Lab:
Create a demo application to understand the role of access modifiers.
Implement multilevel inheritance using different packages.
Access/invoke protected members/methods of a class outside the package.
Override finalize method to understand the behavior of JVM garbage collector.
Session 15:
java.io & java.nio Package
Lecture:
Brief introduction to InputStream, OutputStream, Reader and Writer interfaces
NIO package
Serialization and de-serialization
Shallow copy and deep copy
Lab:
Create a Demo class to Read & write image/text files.
Create SerializationDemo class to illustrate serialization and de-serialization process.
Session 16:
Lecture:
Object Class & java.util Package
Date, DateTime, Calendar class
Converting Date to String and String to Date using SimpleDateFormat class
Object Class: Overriding to String, equals & hashcode method
Collections
Session 17:
Lecture:
Introduction to collections: Collection hierarchy
List, Queue, Set and Map Collections
List Collection:
ArrayList, LinkedList
Vector (insert, delete, search, sort, iterate, replace operations)
Collections class
Comparable and Comparator interfaces
Queue collection
Lab:
Create DateManipulator class to convert String to date, date to String and to find out number of days
between two dates.
Create a List of java defined wrapper classes and perform insert/delete/search/iterate/sort operations.
Create a collection of Employee class and sort objects using comparable and comparator interfaces.
Implement Queue data structure using LinkedList and Queue collection.
Session 20:
Lecture:
MultiThreading : Thread class and Runnable Interface
sleep, join, yield, setPriority, getPriority methods
ThreadGroup class
Lab:
Invoke private methods of some other class using reflection.
Create multiple threads using Thread class and Runnable interfaces.
Assign same task and different task to multiple threads.
Understand sleep, join, yield methods.