Sie sind auf Seite 1von 12

Object-Oriented Programming through Java

Course Description:

This course is about the fundamentals of Object-Oriented Programming (OOP) Concept and OOP-based software
development methodology. Java as a class-based and pure OOP language is used to demonstrate and implement
appropriate concepts and techniques. The students are exposed to the concepts, fundamental syntax, and the thought
processes behind object-oriented programming. By the end of course students will acquire the basic knowledge and
skills necessary to implement object-oriented programming techniques in software development in Java.

Course Objectives:

1. Understand the fundamentals of java programming such as variables, iterative statements, arrays and
strings.
2. Understand the concepts of Object oriented programming including encapsulation, inheritance and
polymorphism.
3. Understand the fundamentals of Object oriented programming in java including defining classes, objects,
and methods.
4. Must be able to develop programs in JAVA for solving various problems that are related to education,
Banking and insurance domain
5. Must be acquainted with the concepts of development of user interface and be able to program the User
Interface development in JAVA
6. Must understand and implement concurrent processing concepts through multithreading, synchronization
and serialization.

Expected Learning Outcomes:

At the end of this course student will:


1. Able to differentiate between structure oriented programming and object oriented programming
2. Understand and Apply Object oriented features and Java concepts.
3. Apply the concept of polymorphism and inheritance.
4. able to understand and apply various object oriented features like inheritance, data abstraction,
encapsulation and polymorphism to solve various computing problems using Java language
5. Be able to implement, compile, test and run Java programs comprising more than one class, to address a
particular software problem
6. To be able to apply object oriented concepts in real world applications.
7. Create Java application programs using sound OOP practices (e.g., interfaces and APIs) and Identify
classes, objects, members of a class and the relationships among them needed for a specific problem.
8. Develop the ability to solve real-world problems through software development in high-level programming
language like Java
9. Implement exception handling and multithreading.
10. Develop applications using Console I/O and applets.
Syllabus:

UNIT I - Introduction
History of Java, Byte code, JVM, Java buzzwords, OOP Principles, Data types, Variables, Scope and life time of
variables, Operators, Control statements, Type conversion and casting ,Arrays.
Concepts of classes and objects ,Introducing methods, Method Overloading, Constructors, Constructor Overloading,
Usage of static with data and methods, Access control, this key word, Garbage collection, Recursion, String class.

UNIT II - Inheritance, Packages and Interfaces


Inheritance Basics, Types of Inheritance, Member access rules, Usage of super key word, Method overriding, Usage
of final,abstract classes, Differences between abstract classes and interfaces, Defining an interface, Implementing
interface, Applying interfaces, Variables in interface and Extending interfaces.
Defining, Creating andAccessing a Package, Importing packages, Access control in packages.

UNIT III - Exception Handling &Multithreading


Concepts of Exception handling, Types of exceptions, Usage of try, Catch, Throw, Throws and Finally keywords,
Built-in exceptions, Creating User Defined Exception.
Concepts of Multithreading, Differences between process and thread, Thread life cycle, Creating multiple threads
using Thread class, Runnable interface, Synchronization, Thread priorities, Inter thread communication, Daemon
threads.

UNIT IV – Collection Framework


Collections Overview, Collection Interfaces: List,Set, Queue, Collection Classes: ArrayList, LinkedList, HashSet,
TreeSet, Accessing a Collection via an Iterator, The Legacy Classes and Interfaces- Dictionary, Hash table, String
Tokenizer.

UNIT - V

GUI Programming with Swing: Introduction, limitations of AWT, Applet Class, Applet skeleton, Simple Applet.

Event Handling- The Delegation event model- Events, Event sources, Event Listeners, Event classes, handling
mouse and keyboard events.

Exploring Swing Controls- JLabel and Image Icon, JText Field, JButton, JCheckBox, JRadioButton, JTabbed
Pane, JList, JCombo Box.

TEXT BOOKS
1. Java The complete reference, 9th edition, Herbert Schildt, McGraw Hill Education (India) Pvt. Ltd.
2. Understanding Object-Oriented Programming with Java, updated edition, T. Budd, Pearson Education.

REFERENCE BOOKS

1. An Introduction to programming and OO design using Java, J. Nino and F.A. Hosch, John Wiley & sons.
2. Introduction to Java programming, Y. Daniel Liang, Pearson Education.
3. Object Oriented Programming through Java, P. Radha Krishna, Universities Press.
4. Programming in Java, S. Malhotra, S. Chudhary, 2nd edition, Oxford Univ. Press.
5. Java Programming and Object oriented Application Development, R. A. Johnson, Cengage Learning.

Course Outcomes:

Course Name Course Outcomes Program


Outcomes
Object- 1. Understand and Apply Object oriented features and Java a, b, c, i, k, l
Oriented concepts.
Programming 2. able to understand and apply various object oriented
through Java features like inheritance, data abstraction, encapsulation
and polymorphism to solve various computing
problems and in real world applications using Java
language
3. Be able to implement, compile, test and run Java
programs comprising more than one class, to address a
particular software problem
4. Create Java application programs using sound OOP
practices (e.g., interfaces and APIs) and Identify classes,
objects, members of a class and the relationships among
them needed for a specific problem.
5. Develop the ability to solve real-world problems
through software development in high-level
programming language like Java
6. Implement exception handling and multithreading.
7. Develop applications using Console I/O and applets.
CO-PO Mapping:

Course Name Course a b C D e f g h I j K l


Outcomes
Object- CO1 √
Oriented
Programming
CO2 √ √ √ √ √
through Java CO3 √ √ √ √ √
CO4 √ √ √
CO5 √ √ √ √ √ √
CO6 √ √ √
CO7 √ √ √

Topics included
UNIT. R16 AICTE R19 / removed
NO Syllabus Syllabus Syllabus With
justification
I History of Java, Byte code, JVM, Features of History of Java, Byte code, Included
Topics:
Java buzzwords, OOP Principles, object- JVM, Java buzzwords, OOP
-NIL-
Data types, Variables, Scope and oriented Principles, Data types,
Removed
life time of variables, Arrays, programming Variables, Scope and life time
Topics:
Operators, Control statements, . of variables, Operators, -NIL-
Type conversion and casting, Control statements, Type
Concepts of classes and objects conversion and casting ,Arrays.
Introducing methods, Method Concepts of classes and objects
Overloading, Constructors, ,Introducing methods, Method
Constructor Overloading ,Usage of Overloading, Constructors,
static with data and methods, Constructor Overloading,
Access control, this key word, Usage of static with data and
Garbage collection, Recursion, methods, Access control, this
String class. key word, Garbage collection,
Recursion, String class.

II Inheritance Basics, Types of Inheritance Inheritance Basics, Types of Included


Topics:
Inheritance, Member access rules, in OO Inheritance, Member access
-NIL-
Usage of super key word, Method design, rules, Usage of super key word,
Removed
overriding, Usage of final,abstract Implementing Method overriding, Usage of
Topics:
classes, Differences between OO language final,abstract classes, -NIL-
abstract classes and interfaces, features. Differences between abstract
Defining an interface, classes and interfaces, Defining
Implementing interface, Applying an interface, Implementing
interfaces, Variables in interface interface, Applying interfaces,
and Extending interfaces. Variables in interface and
Defining, Creating andAccessing a Extending interfaces.
Package, Importing packages, Defining, Creating
Access control in packages. andAccessing a Package,
Importing packages, Access
control in packages.

III Concepts of Exception handling, Not Included Concepts of Exception Included


Topics:
Types of exceptions, Usage of try, handling, Types of exceptions,
-NIL-
Catch, Throw, Throws and Finally Usage of try, Catch, Throw,
Removed
keywords, Built-in exceptions, Throws and Finally keywords,
Topics:
Creating User Defined Exception. Built-in exceptions, Creating -NIL-
Concepts of Multithreading, User Defined Exception.
Differences between process and Concepts of Multithreading,
thread, Thread life cycle, Creating Differences between process
multiple threads using Thread and thread, Thread life cycle,
class, Runnable interface, Creating multiple threads using
Synchronization, Thread priorities, Thread class, Runnable
Inter thread communication, interface, Synchronization,
Daemon threads. Thread priorities, Inter thread
communication, Daemon
threads.

IV Window Programming Generic Collections Overview, Included


Topics:
Applet Class, Applet Architecture, types and Collection Interfaces: List,
Collection
Applet Skeleton, Simple Applet, collections Set, Queue, Collection Framework
Display Methods, Requesting Classes: ArrayList,
Removed
Repainting - A simple banner LinkedList, HashSet,TreeSet, Topics:
Applets and
Applet, Using the Status Window, Accessing a Collection via an
Event Handling
The HTML APPLET Tag, Passing Iterator,The Legacy Classes
Justification:
parameters to Applets. and Interfaces- Dictionary,
These topics are
Event sources, Event classes – Hashtable , String Tokenizer covered in UNIT
– V.
ActionEvent, AdjustmentEvent,
ComponentEvent, Container
Event, ItemEvent, KeyEvent and
MouseEvent, Delegation event
model, Event Listeners, Handling
mouse and Keyboard events,
Adapter classes.

V Frame, Font class, Color class and GUIs. GUI Programming with Included
Topics:
Graphics. AWT Controls : Buttons, Graphical Swing: Introduction,
Applets and
Labels, Text fields, Text area, programming limitations of AWT, Applet Event Handling
Check boxes, Check box groups, with Swing Class, Applet skeleton, Simple
Removed
Lists, Choice, Scrollbars, Menus, Applet. Topics:
Layout Managers
Layout Managers - Flow, Border,
Event Handling- The
Grid, Card and Grid bag .JApplet, Justification:
Delegation event model-
To maintain
JFrame and JComponent, Icons
Events, Event sources, Event uniform weight
and Labels, Handling threading age among all
Listeners, Event classes,
units.
issues, Text fields, Buttons – The
handling mouse and keyboard
JButton class, Check boxes, Radio
events.
buttons, Combo boxes, Tabbed
Panes, Scroll Panes, Trees, and Exploring Swing Controls-
JLabel and Image Icon, JText
Tables.
Field, JButton, JCheckBox,
JRadioButton, JTabbed Pane,
JScroll Pane, JList, JCombo
Box, Swing Menus.

Statistics on Content Revision

80% of AICTE 2018 Syllabus was covered in R-19


90% of R-16 Syllabus was covered in R-19
30% of content was revised from R-16 to R-19
List of Experiments in OOPS Through java

Exercise-1

a. Write a Java program to print “Welcome”.

b. Write a java program to find the sum of even numbers upto 100.

c. Write a java program to print the following output.

1
2 3
4 5 6
7 8 9 10

e. Write a program in Java to print the Floyd's Triangle.

1
01
101
0101
10101

Exercise-2

a. Write a java program to read the different types of data from the user and display that
data using Scanner class.

b. Write a java program to read the different types of data from the user and display that
data using command line arguments.

c. Write a Java program that prompts the user for an integer and then prints out all prime
numbers up to that integer.

Exercise-3

a. Write a Java program to illustrate type conversions.

b. Write a java program to observe the effects of various bitwise operators.


c. Raju's parents are celebrating their marriage anniversary. They have arranged a small
party tonight. They are expecting their colleagues and Raju's friends to attend the party.
They have planned to serve 'Coke' and 'Badam Milk' to these guests. But they would like
to serve 'Badam Milk' to teenagers and 'Coke' to adults. Please help them in finding
teenagers and adults based on age. Write a Java program to find out the adults and
teenagers based on their age.

Note: Teenagers are those whose age is between 13 and 19 (both inclusive).

 Step by Step guide


 Read the age as input from the user
 Check the age with the conditions mentioned
 Display the appropriate messages (Eg: Adult or Teenager) and also a message
regarding the drink (Eg: Badam Milk or Coke)

d. Write a Java program to find the largest number out of 3 numbers using nested if.
e. There is a telecommunication company called “PoweredAir” who have approached you
to build their Interactive Voice Response (IVR) system. You should write a Java program
and be able to provide the following menu (given below):

Note: User should provide an input for each menu display.


Welcome to Powered Air Service. What would you like to do?

1. Know my balance
2. Know my validity date
3. Know number of free calls available
4. More
 Prepaid Bill Request
 Customer Preferences
 GPRS activation
 Special Message Offers
 Special GPRS Offers
 3G Activation
 Go back to Previous menu

If user types in 7 the first menu should be displayed.


You are free to display your own messages in this IVR

Exercise-4

a. Write a Java program to print Fibonacci series using for loop.


b. Write a Java program to check whether given number is Armstrong or not using while
loop.
c. Write a Java program to read 10 numbers from user and store it in a array. Display the
maximum and minimum number in the array.
d. Write a java program to sort the given list of elements in an array.
e. Write a Java program to search a given element in the array.
f. Write a Java program to calculate multiplication of 2 matrices.
Exercise-5
a. Create a class Rectangle. The class has attributes length and width. It should have
methods that calculate the perimeter and area of the rectangle. It should have read
Attributes method to read length and width from user.

Hint: Area of rectangle = length * width


Perimeter of rectangle = 2*(length+width)

b. Design a class "Company" which has as attributes yearOfEstablishment, annualTurnover,


annualSales, etc., Moreover, these details need to be available to the outside world. Have
appropriate methods for displaying these details. You will also need to calculate the
profitability of this company (if annualTurnover/annualSales > 1 then profitability is
high; <0.5 then profitability is low; between 0.5 and 1 then profitability is medium).

c. Write a java program that implements method overloading.


d. Write a java program to check weather given string is palindrome or not.
e. Write a Java Program that reads a line of integers, and then displays each integer, and the
sum of all the integers (use StringTokenizer class)
f. Write a Java program for sorting a given list of names in ascending order.
g. Create an abstract class Media (id, description). Derive classes Book (pagecount) and
CD(playtime). Define parameterized constructors. Create one object of Book and CD

each and display the details.


h. Write a Java program that displays the number of characters, lines and words in a text
file.

Exercise-6
a. Write a java program to implement various types of inheritance.
i. Single ii. Multi Level iii. Hierarchical iv. hybrid
b. Write a java program to implement runtime polymorphism.

Exercise-7
a. Define an interface, operations which has method area(), volume(). Define a constant PI
having value 3.14. Create class a Cylinder which implements this interface (member-id,
height). Create one object and calculate area and volume.
Exercise-8
b. Write a java program to implement the following

1. Creation of simple package


2. Accessing a package
Exercise-9
a. Write a java program which accepts withdrawamount from the user and throws an
exception “In Sufficient Funds” when withdrawamount more than available amount.
b. Write a java program to illustrate finally block.

Exercise-10
a. Write a java program to create three threads and that displays “good morning”, for every
one second ,”hello” for every 2 seconds and “welcome” for every 3 seconds by using
extending Thread class.
b. Write a Java program that creates three threads. First thread displays “OOPS”, the second
thread displays “Through” and the third thread Displays “JAVA” by using Runnable
interface.
Exercise -11
a. Write a Java program to create a new array list, add some colors (string) and print out the
collection
b. Write a Java program to shuffle elements in a array list
c. Write a Java program to iterate through all elements in a linked list
d. Write a Java program to iterate through all elements in a hash list
e. Write a Java program to create a new tree set, add some colors (string) and print out the
tree set
Exercise-12
a. Implement a Java program for handling mouse events when the mouse entered, exited,
clicked, pressed, released, dragged and moved in the client area.

b. Implement a Java program for handling key events when the key board is pressed,
released, typed.
Exercise-13

a. Write a java swing program that reads two numbers from two separate text fields and
displaysum of two numbers in third text field when button”add” is pressed.

b. Develop an Applet program to accept two numbers from user and output the sum,
difference in the respective text boxes.
c. Write a JAVA program to design student registration form using Swing Controls.
The form which having the following fields and button SAVE
a. Form Fields are: Name, RNO, Mailid, Gender, Branch ,Address

Das könnte Ihnen auch gefallen