OOPS
OOPS
OOPS
ENGINEERING
COLLEGE
TRICHY
COURSE FILE
CS 8391 Object Oriented Programming
III Semester Computer Science and Engineering
Syllabus
Course Objectives and Course Outcomes
Program Educational Objectives and Program Outcomes
Program Specific Outcomes
Course Plan
Assignments
Lecture noting
Tutorials
Question Bank
Internal Test Question Bank
University Question Papers
Sample Answer sheets
Sample Assignments
Assessment Report
SUMMARY
Having celebrated its 22nd anniversary in 2017, Java has experienced consistent
development in its programming efficiency for decades. It is one of the most popular
programming languages around the world and is designed to keep running on any stage
consistently. Java is still a relevant programming language that shows no sign of
declining in popularity and, for that reason, is worth learning. Most developers pick it up
as their first programming language because it’s reasonably easy to learn. Since the
language has an English-like syntax with minimum special characters, Java could be
learned in a short time span and used to build suitable applications. Java is part of a
family of languages that are heavily influenced by C++ (as well as C#), therefore learning
Java offers vast benefits when learning these other two languages. Nowadays, Java is
often the default choice for scientific applications, including natural language processing.
The main reason for this is because it is safe, portable, maintainable and comes with
better high-level concurrency tools than C++ or any other language. Depending on your
career prospects, Java can take you on different career paths. Whether learners are
interested in building games, mobile applications, desktop applications, or web
applications, Java is capable of working in these environments. Regardless of whether or
not to use Java in the career or job role can learn syntax, ideas, patterns, tools, styles, and
idiosyncrasies that are readily transferable to other programming languages as well.
Learning Java will give the opportunity to see how one language does something in
comparison to another. Additionally, knowing what works for Java and other languages
will make even better well-rounded developer.
SYLLABUS
Differences between multi-threading and multitasking, thread life cycle, creating threads,
synchronizing threads, Inter-thread communication, daemon threads, thread groups.
Generic Programming – Generic classes – generic methods – Bounded Types –
Restrictions and Limitations.
`
UNIT V EVENT DRIVEN PROGRAMMING
TOTAL: 45 PERIODS
TEXT BOOKS:
1. Herbert Schildt, “Java The complete reference”, 8th Edition, McGraw Hill Education,
2011.
2. Cay S. Horstmann, Gary cornell, “Core Java Volume –I Fundamentals”, 9th Edition,
Prentice Hall, 2013.
REFERENCES:
1. Paul Deitel, Harvey Deitel, “Java SE 8 for programmers”, 3rd Edition, Pearson, 2015.
2. Steven Holzner, “Java 2 Black book”, Dreamtech press, 2011.
3. Timothy Budd, “Understanding Object-oriented programming with Java”, Updated
Edition, Pearson Education, 2000.
.
Pos & PSO Mapping with CO
Program
Course
Program Outcomes Speciifc
Outcomes
Outcomes
P P P P P P P P P PO PO PO
CO PSO1 PSO2
O1 O2 O3 O4 O5 O6 O7 O8 O9 10 11 12
CO1 H H M H M
CO2 H H M H M
CO3 H H M H M
CO4 H H H M H H
CO5 H H H H H
CO6 H H H M M M M H H
COURSE PLAN
Book /
Teaching Instructional
Sl. Lecture Chapter
TOPICS Aids/ Delivery CO PO/ PSO
No. Hours /
Method Level
Pages
1.1 Object Oriented
Programming
T1
1.1.1Object and Classes Black
/C2/Pg CO 1 PO1,2,3/
1 1.1.2 Inheritance 1 Board Understand
17-23 PSO1,2
1.1.3 Polymorphism
1.1.4 Abstraction
1.1.5 Encapsulation
1.1.6 OOP in java T1//C1/ Black
PO1,2,3/
2 2 Board Understand CO 1
1.1.7 Characteristics of Java Pg 11-17 PSO1,2
1.2 The Java Environment
1.2.1 Java Source File T1/C2/ Black
PO1,2,3/
3 3 Board Understand CO 2
1.2.2 Structure Pg 23-33 PSO1,2
1.2.3 Compilation
1.3 Fundamental
Programming Structure in
Java
1.3.1 Defining classes in T1/C3/ Black
PO1,2,3/
4 java 4 Pg 33-50 Board Apply CO 2
PSO1,2
1.4 Constructors
1.4.1 Variable arguments
1.4.2 Garbage Collecetions
1.4.3 Recursion
1.5 Methods
1.5.1 Method Calling
1.5.2 Passing Parameters by T1/C6/ Black
Value PO1,2,3/
5 5 Pg116- Board Apply CO 2
1.5.3 Method Overloading PSO1,2
126
1.5.4 Using Command-Line
Arguments
1.6 Access Specifiers
1.7 Static members T1/C2/ Black
PO1,2,3/
6 6 Board Apply CO 2
1.8 comments Pg 30-33 PSO1,2
Activities if any:
1. Practice the students to write programs for the basic logic: Quiz
Quiz: - Students are given prior information to organize the Quiz program and also they
gave the set of questions . with the organizing committee they conducted the program and
finally announced the students list those who got the highest scores.
Activities if any:
1. Quiz:
Step3: Students will go to the Sun website and look up essential Java terms.
Step4:Students will code different program
Teaching Instructional
Sl. Lecture Books /
TOPICS Method/ Delivery CO PO/ PSO
No. Hours Chapter
Aids Level
3.1 Exception
3.1.1 Exception
hierarchy T1/C10/ Black PO1,2,3,9/
20 20 Apply CO 4
3.1.2 throwing Pg207-220 Board/PPT PSO1,2
and catching
exception
3.1.3 built in
exception PO1,2,3,9/
T1/C10/ Black
21 21 Apply CO 4 PSO1,2
3.2 Creating Pg221-227 Board
own exception
3.3 Stack Trace PO1,2,3,9/
T1/C16/Pg Black
22 22 Apply CO 4 PSO1,2
elements 438-445 Board/PPT
Activities if any:
Group Discussion
Step1: Using powerpoint activities object oriented programming and the general form of a
Java program will be explained by one group of students
Step2: Working together Students wil continue programming practice with computer art
activities
Activities if any:
1. Collection of different results
Students will present their projects to the class. Questions will be solicited from
other members of the class.
Since the curriculum and syllabus have been designed 4 years back the gaps arising out of
new developments in meeting the outcomes have been identified and provided as contents
beyond syllabus. Study of various practical cases know about the features of Java
Content beyond Syllabus:
Instructional
Sl. Lecture Books / Teaching PO/
TOPICS Delivery
No. Hours Chapter Aids PSO
Level
To create a Web
1 PO8,11/
Page 46 Internet BB/PPT Understand
PSO 2
How to connect with
2 PO8,11/
the Database 47,48 Internet BB/PPT Understand
PSO 2
ASSIGNMENTS
ASSIGNMENT – 1
ASSIGNMENT – 2
S. No Question Marks Level CO
i) Write the Program using the following steps
Create a Student details such as student
name,details,marks 10
ii)Use the Input console methods to receive the inputs
from the user.Generate the grade sysyetm using decision
1 Apply C
statements.Save these details and it shoud be viewed in a
file (using reading and writing File methods).
iii)Explain stack trace elements with examples
iv)explain i/o streams with example
v)write a example for reading and writings files in java
2 i)Thrad Need with its life cycle,(Each step should 5 Apply C
explained with an syntax and example)
ii)Simple application program likje producer Consumer 5
Problem using Multihtreading concepts
iii)explain interthread communication
iv)Explain generic programming
v) give one example program for multi threading and multi
tasking
ASSIGNMENT – 3
S.
Question Marks Level CO
No
Write a simple application using the following classes
and methods
1.In event Handling use action listener and Mouse
lisetener
Application Design 5
Program Structure 10
2.In Swing use the components check boxes Radio
1. buttons Choices such as and check all the components if
Apply CO 6
there is achange in any components dialogue box is use to
display the changes
Application Design 5
Program Structure 10
Innovative Assignment
S.No Question Marks C
Level
O
Group Assignment
Each group has maximum of 4 memebers. Simple
mini project /application should be presented .
That should satisfy the following constraints
Program should be in proper structured 5 3
format 4
It should cover the concept of Inheritance 5
1. and Interfaces Apply 5
Exception shold be identified and it must be 5
thrown 6
Event Handler and swing components must 20
be used in the simple application
LECTURE NOTING
QUESTION BANK
QUESTION BANK
UNIT I
INTRODUCTION TO OOP AND JAVA FUNDAMENTALS
BT LEVEL CO
Q.No. QUESTIONS
2 Marks
9 Enumerate two situations in which static methods are used. Understand CO2
17 Justify what is the need for javadoc multiline comments. Evaluate CO2
6 Marks
Remember
1 Explain the types of package with its importance. CO2
Demonstrate the static fields and methods used in java. Apply CO2
7
Apply CO2
8 Differentiate constructor and method with example.
Assess the different methods in java. Util. Arrays class with Evaluate CO2
10 example.
7 Marks
State the purpose of finalize() method in java? With an
1 example explain how finalize() method can be used in java Remember CO2
program.
8 Marks
2 Write a Java program to test the prime numbers between the Apply CO2
given two limits
13 Marks
With relevant examples describe abstraction and
1 encapsulation. Write a java program that uses an Understand CO2
abstraction and encapsulation.
i. Default constructors
15 Marks
Write a program to perform the following functions using
classes, objects, constructors and destructors where essential
i. Get as input the marks of 5 students in 5 subjects (5)
Apply CO2
1 ii. Calculate the total and average (5)
iii. Print the formatted result on the screen (5)
Make a class Student. The Student class has data members
such as roll number, name, branch. Create a class called Exam
that has data members roll number and six subject marks. Apply CO2
Derive the result class from Student and Exam it has own data
members such as total mark, and result. Write a Java program
2 to model the relationships.
UNIT II
INHERITANCE AND INTERFACE
BT LEVEL CO
Q.No. QUESTIONS
2Marks
17 Deduce the meaning for the keywords : final, finally, finalize. Understand CO3
18 In how many ways you can create string objects in java. Apply CO3
Create a java program to remove all white spaces from a Apply CO3
19 string in java.
6 Marks
3 Explain about inner classes and its types with examples CO3
Apply
8 Marks
13 Marks
6 Summarize the concept of supper classes and sub classes. Understand CO3
15 Marks
UNIT III
EXCEPTION HANDLING AND I/O
BT LEVEL CO
Q.No. QUESTIONS
2 Marks
10 Give any two methods available in stack tree element. Understand CO4
13 Mark
15 Marks
Why only read() methods in ByteArrayInputStream
does not throw IOException?
CO4
1 Understand
UNIT IV
BT LEVEL CO
Q.No. QUESTIONS
2 Marks
7 Markx
Mention the motivations of generic programming.
1 Apply CO5
13 Marks
1 List the two ways of implementing threads with example. Remember CO5
2 Label the different states of a thread and explain it. Remember CO5
Define the concept of Generic Type Information in virtual
3 machine. Remember CO5
4 Tell briefly about reflection and generics. Give an example. Remember CO5
What is a thread? Describe the lifecycle and states of CO5
5 thread with exam.ples. Understand
13 Marks
15 Marks
Q.N BT LEVEL CO
QUESTIONS
o.
6 Marks
7 Marks
3 Apply CO6
Compare check boxes and radio buttons with an example.
8 Marks
1 Create a program use of BorderLayout Apply CO6
13 Marks
2 List the methods available to draw shapes and COLOR. Remember CO6
Outcomes
CO1 CO2 CO3 Total
Levels
Remember 2 2 2 6
Understand 2 15 47 64
Apply 13 2 15 30
Apply
Total 17 19 64 100
Outcomes
CO4 CO5 Total
Levels
Remember 4 4
Understand 49 32 81
Apply 15 15
Apply
Total 49 51 100
Outcomes
CO 1 CO 2 CO 3 CO 4 CO 5 CO 6 Total
Levels
Remember 4 4
Understand 2 17 15 15 13 62
Apply 6 28 34
Apply
2 17 15 15 23 28 100
Total
Model Exam
Overall Level-wise Test Assessment details
Tests
PT 1 PT 2 Model Total
Levels
Remember 6 4 4 14
Understand 64 81 62 207
Apply 30 15 34 75
Apply
Total 100 100 100
(OR)
Illustrate what is polymorphism? Write a java program that (13)
b) Understand
implements Polymorphism
(i) Distinguish argument and parameter? Discuss with (7)
Understand
12.a) example.
(ii) Differentiate constructor and method with example. (6) Understand
(OR)
(i). Explain the features and the characteristics of Java. (7) Understand
b) (ii). Explain the characteristics of OOPs. (6) Understand
(i). What is class? How do you define a class in java with an (6)
Apply
example?
13.a)
(ii). Define Package? How does compiler locate packages? (7)
Apply
Explain arrays in java with an example?
(OR)
Write a Java program to create a student examination (6)
database system that prints the mark sheet of students. Input
student name, marks in 6 subjects. This mark should be
between 0 and 50. If the marks are not in specified range,
Apply
b) exception is thrown else find the total marks and print
percentage of students.
PART-C
(1 x 15 = 15 marks)
(OR)
Q. Nos 1 2 6
Remember 6
Marks 1x2=2 1x2=2 1x2=2
5,7,8,9
Q. Nos 3 4,11
12,14,15
Understand 64
1x2=2 4x2=8
Marks 1x2=2
1x13=13 3x13=39
Q. Nos 13 10 16
Apply 30
Marks 1x13=13 1x2=2 1x15=15
Q. Nos
Apply
Marks
Total 17 19 64 100
Roll No:
PART-B
(5 x 13 = 65 marks)
S.NO QUESTIONS BT Level
Define exception. Why it is neede? Explain the different types of
11.a) exceptions and the exception hierarchy with appropriate examples Understand
using JAVA
(OR)
While reading a file how would you check whether you have
b) Understand
reached the end of the file?
What are the Input and Output streams? Explain them with Understand
12.a)
illustrations.
(OR)
Differentiate byte stream and Character stream with necessary
b) Understand
examples.
(OR)
Design two threads to display odd numbered element in an
b) array of size 50 and even numbered element in another array of Understand
size 50. Create instances of the above thread and run them.
PART-C
(1 x 15 = 15 marks)
Q. Nos 6,10
Remember
Marks 2x2=10
1,2,3,4,5 7,8,9
Q. Nos
11,12,13 14,15
Understand
5x2=10 3x2=6
Marks
3x13=39 2x13=26
Q. Nos 16
Apply
Marks 1x15=15
Q. Nos
Apply
Marks
Total
DAC Member IQAC Member
Roll No:
PART-B
(5 x 13 = 65 marks)
S.NO QUESTIONS CO
i. Enumerate the features of Java and list out its
characteristics . (7) Understand 2
11.a)
ii. How the automatic initialization is happen explain with an
Understand 2
example. (6)
(OR)
Write a program to perform the following functions using
classes, objects, constructors and destructors where essential
b) i. Get as input the marks of 5 students in 5 subjects Understand 2
ii. Calculate the total and average
iii. Print the formatted result on the screen
Define Inheritance? With diagrammatic illustration
12.a) Understand 3
and java programs illustrate the different types of inheritance
(OR)
Create a abstract Reservation class which has Reserve
b) abstract method. Implement the sub-classes like ReserveTrain Understand 3
and Reserve Bus classes and implement the same .
Evaluate a try block that is likely to generate three types of
13.a) exception and then incorporate necessary catch blocks Understand 4
and handle them appropriately
(OR)
(i) Describe the stack trace elements with an example. (7) Understand 4
b) (ii) Differentiate byte stream and character stream with
Understand 4
necessary examples . (6)
List the two ways of creating & implementing threads with
14.a) Understand 5
example and Justify its performance
(OR)
Explain how string manipulation is done in Java with different
b) Understand 5
methods
PART-C
(1 x 15 = 15 marks)
S.NO QUESTIONS CO
16.a) i. Infer JList and JComboBox with an example. (8)
Apply6
(OR)
Q. Nos 7,8
Remember 4
Marks 2x2=4
1,3
Q. Nos 2 4,12 5,13 14
11
Understand 62
2x2=4 1x2=2 1x2=2
Marks 1x2=2 1x13=13
1x13=13 1x13=13 1x13=13
6,9,10
Q. Nos 15,16
Apply 34
3x2=6 1x13=13
Marks
1x15=15
Q. Nos
Apply
Marks
Total 2 17 15 15 23 28 100