Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

DEPARTMENT OF CSE -AR20 Regulations

II Year I OBJECT ORIENTED PROGRAMMING


L T P C
Semester Through JAVA (Common to all
CODE 20ES3005 B.Tech-branches) 3 0 0 3

Course Objectives:
This course is designed to:
 Study the basic concepts and functions of operating systems
 Understand the concepts of classes and objects, Applet and AWT
 Learn classifications of inheritance
 Introduce Identifying and rectifying errors using exceptions
 Emphasize the concepts of Applets, AWT
Course Outcomes:
At the end of the course the student will be able to
CO1.Summarize object oriented programming concepts
CO2. Create simple applications using classes and objects, Applet and AWT
CO3. Develop applications using different types of inheritances
CO4. Apply parallel processing applications using threads
CO5. Analyze and recover runtime exceptions arise in the applications

UNIT I
Introduction to OOP, procedural programming language and object oriented
language, principles of OOP, applications of OOP, history of java, java features, JVM,
program structure. Variables, primitive data types, identifiers, literals, operators,
expressions, precedence rules and associativity, primitive type conversion and casting,
flow of control.

UNIT II
Classes and objects, class declaration, creating objects, methods, constructors and
constructor overloading, garbage collector, importance of static keyword and
examples, this keyword, arrays, command line arguments, nested classes.

UNIT III
Inheritance, types of inheritance, super keyword, final keyword, overriding and
abstract class. Interfaces, creating the packages, using packages, importance of
CLASSPATH and java. Lang package. Exception handling, importance of try, catch,
throw, throws and finally block, user defined exceptions, Assertions.
UNIT IV
Multithreading: introduction, thread life cycle, creation of threads, thread priorities,
thread synchronization, communication between threads.

UNIT V
Applet: Applet class, Applet structure, Applet life cycle, sample Applet programs.
Event handling: event delegation model, sources of event, Event Listeners, adapter
classes, inner classes. AWT: introduction, components and containers, Button, Label,
Checkbox, Radio Buttons, List Boxes, Choice Boxes, Container class, Layouts, Menu and
Scrollbar.

Text Books:
1. The complete Reference Java, 8th edition, Herbert Schildt, TMH.
2. Programming in JAVA, Sachin Malhotra, Saurabh Choudary, Oxford.
3. Introduction to java programming, 7th edition by Y Daniel Liang, Pearson

Reference (s) :
1. Dietal & Dietal, Java: How to Program, 8th Edition, PHI, 2010
2. C. S. Horstmann and G. Cornell, Core Java, Vol 1. Fundamentals, 7th Edition, Pearson
Education, 2004
3. C. Horstmann, BIG JAVA Compatible with Java 5 & 6, 3rd Edition, Wiley Publishers,
2008
DEPARTMENT OF CSE -AR20 Regulations
II Year I Semester Name of the Lab L T P C
JAVA Programming Lab
Code: 20ES3105 0 0 3 1.5
(Common to all B.Tech Branches)

Course Objectives:
This course is designed to:
 To understand object oriented concept
 To become familiar with classes and objects
 Understand various kinds of methods
 Introduce built-in and user defined exceptions
 To become familiar the concepts of Applets, AWT
Course Outcomes:
At the end of the course the student will be able to
CO1. Able to implement code for all object oriented programming concepts
CO2. Able to code with classes/objects and various types methods
CO3. Able to develop static and dynamic polymorphism
CO4. Able to code parallel programming using threads
CO5. Able to design and develop GUI programming
Exercise - 1 (Basics)
a). Write a JAVA program to display default value of all primitive data type of
JAVA
b). Write a java program that display the roots of a quadratic equation
ax2+bx=0. Calculate the discriminate D and basing on value of D, describe the
nature of root.
c) Write a case study on public static void main(250 words)

Exercise - 2 (Control -flow)


Write a JAVA program to print a table for a given number for, while and do while
loops.
Exercise - 3 (Strings)
Write a JAVA program to demonstrate String handling methods
Exercise - 4 (Class, Objects)
a). Write a JAVA program to implement class mechanism. – Create a class,
methods and invoke them inside main method.
b). Write a JAVA program to implement constructor.
Exercise - 5 (Static)
Write a JAVA program to describe the usage of static keyword. (static keyword in
front of variable, method and a class)

Exercise - 6 (Methods)
Write a JAVA program to implement constructor overloading. b). Write a JAVA
program implement method overloading.
Exercise - 7 (Inheritance)
a). Write a JAVA program to implement Single Inheritance
b). Write a JAVA program to implement multi level Inheritance
Exercise - 8 (Inheritance - Continued)
a). Write a JAVA program give example for “super” keyword.
b). Write a JAVA program to implement Interface. What kind of Inheritance can
be achieved
Exercise - 9 (Exception)
Write a JAVA program that describes simple exception handling mechanism
b).Write a JAVA program Illustrating Multiple catch clauses

Exercise – 10 (Threads)
Write a JAVA program that creates threads by extending Thread class .First
thread display “Good Morning “every 1 sec, the second thread displays “Hello
“every 2 seconds and the third display “Welcome” every 3 seconds ,(Repeat the
same by implementing Runnable)

Exercise – 11 (Threads)
Write a program to illustrate any 10 built-in functions in Thread class (Ex:
isAlive and join ())
Exercise - 12 (Applet)
Write a JAVA program to Demonstrate Applet application

Exercise - 13 (Applet)
Write a JAVA program to create different shapes and fill colors using Applet
Exercise - 14 (AWT)
Write a JAVA program to demonstrate the usage of events, components in AWT.
(Simple Front End application with Labels, TextBoxes and Buttons)

Exercise - 15 (AWT)
Write a JAVA program that to demonstrate Mouse Handling

You might also like