Vous êtes sur la page 1sur 64

M.I.E.T.

ENGINEERING
COLLEGE
TRICHY

COURSE FILE
CS 8391 Object Oriented Programming
III Semester Computer Science and Engineering

Department of Computer Science and Engineering


CONTENTS

 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

CS8391 OBJECT ORIENTED PROGRAMING LT PC


3003

UNIT I INTRODUCTION TO OOP AND JAVA FUNDAMENTALS

Object Oriented Programming - Abstraction – objects and classes - Encapsulation-


Inheritance - Polymorphism- OOP in Java – Characteristics of Java – The Java
Environment - Java Source File -Structure – Compilation. Fundamental Programming
Structures in Java – Defining classes in Java – constructors, methods -access specifiers -
static members -Comments, Data Types, Variables, Operators, Control Flow, Arrays ,
Packages - JavaDoc comments.

UNIT II INHERITANCE AND INTERFACES

Inheritance – Super classes- sub classes –Protected members – constructors in sub


classes- the Object class – abstract classes and methods- final methods and classes –
Interfaces – defining an interface, implementing interface, differences between classes
and interfaces and extending interfaces - Object cloning -inner classes, Array Lists -
Strings

UNIT III EXCEPTION HANDLING AND I/O

Exceptions - exception hierarchy - throwing and catching exceptions – built-in


exceptions, creating own exceptions, Stack Trace Elements. Input / Output Basics –
Streams – Byte streams and Character streams – Reading and Writing Console –
Reading and Writing Files

UNIT IV MULTITHREADING AND GENERIC PROGRAMMING

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

Graphics programming - Frame – Components - working with 2D shapes - Using color,


fonts, and images - Basics of event handling - event handlers - adapter classes - actions -
mouse events - AWT event hierarchy - Introduction to Swing – layout management -
Swing Components – Text Fields , Text Areas – Buttons- Check Boxes – Radio Buttons –
Lists- choices- Scrollbars – Windows –Menus – Dialog Boxes.

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.

COURSE OBJECTIVES AND COURSE OUTCOMES


Sl. Course Objective Course Outcomes
No. On completion of course the
students will be able to:
1 To understand Object Classify the difference between
Oriented Programming Object Oriented Programming
concepts and basic and Procedural Oriented language
characteristics of Java

2 To know the principles of Identify members of a class and its


packages, inheritance and relationships for a particular
interfaces problem

3 To define exceptions and use Demonstrate the concepts of


I/O streams polymorphism and inheritance

4 To define exceptions and use Identify how to overcome the


I/O streams disrupts of normal flow with the
sequence of data
5 To develop a java application Illustrate the importance of
with threads and generics concurrency and able to apply the
classes classes and interfaces as
parameters
6 To design and build simple Apply platform independent
Graphical User Interfaces application runtime environment
and choose appropriate runtime
environment to create GUI and
Web applications using Java
language.

Programme Educational Objectives and Programme Outcomes


Sl. Programme Educational Programme Outcomes
No. Objectives (PEOs) (POs)
On Completion of the programme Graduands
will be able to:
To acquire sound knoweledgea. Engineering Remember: Apply the
and exhibit technical skills to Remember of mathematics, science,
develop & implement engineering fundamentals, and an engineering
1
solutions in Computer Science specialization to the solution of complex
and Engineering discipline engineering problems.
b.
1. To inculcate high level ofc. Problem analysis: Identify, formulate, review
professionalism and ethical research literature, and Apply complex
attitude, effective engineering problems reaching substantiated
communication skills, team conclusions using first principles of
2 spirit, multidisciplinary mathematics, natural sciences, and
approach and an ability to engineering sciences.
adopt challenging
environment in the IT
industries
To nurture leadershipd. Design/development of solutions: Design
qualities, intellectual curiosity solutions for complex engineering problems
for social needs. and design system components or processes
that meet the specified needs with appropriate
3 consideration for the public health and safety,
and the cultural, societal, and environmental
considerations.

To enlighten the students withe. Conduct investigations of complex


ideal entrepreneurship problems: Use research-based Remember and
qualities and motivate them research methods including design of
4 for doing higher studies. experiments, analysis and interpretation of
data, and synthesis of the information to
provide valid conclusions.

f. Modern tool usage: Create, select, and apply


appropriate techniques, resources, and modern
engineering and IT tools including prediction
5 and modeling to complex engineering
activities with an Understand of the
limitations.

g. The engineer and society: Apply reasoning


informed by the contextual Remember to
assess societal, health, safety, legal and
6
cultural issues and the consequent
responsibilities relevant to the professional
engineering practice.
Programme Outcomes
Sl. Programme Educational (POs)
No. Objectives (PEOs) On Completion of the programme Graduands
will be able to:
h. Environment and sustainability: Understand
the impact of the professional engineering
solutions in societal and environmental
7
contexts, and demonstrate the Remember of,
and need for sustainable development.

i. Ethics: Apply ethical principles and commit to


professional ethics and responsibilities and
8
norms of the engineering practice.
j.
k. Individual and team work: Function
effectively as an individual, and as a member
9 or leader in diverse teams, and in
multidisciplinary settings
l.
m. Communication: Communicate effectively on
complex engineering activities with the
engineering community and with society at
large, such as, being able to comprehend and
10
write effective reports and design
documentation, make effective presentations,
and give and receive clear instructions.
n.
o. Project management and finance:
Demonstrate Remember and Understand of
the engineering and management principles
and apply these to one’s own work, as a
11
member and leader in a team, to manage
projects and in multidisciplinary
environments.
p.
q. Life-long learning: Recognize the need for,
and have the preparation and ability to engage
12 in independent and lifelong learning in the
broadest context of technological change.
PROGRAM SPECIFIC OUTCOMES

Sl.No. Programme Specific Outcomes

Ability to apply programming and interpersonal skills to implement


1
various algorithms for complex engineering problems.
Ability to design effective solutions for real time problems of both
2
industry and society using cutting edge technologies.

.
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

UNIT I : INTRODUCTION TO OOP AND JAVA FUNDAMENTALS

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

1.9 Data Types T1/P 65 Black


PO1,2,3/
7 7 Board Remember CO 2
1.10 Variables T2/P 52 PSO1,2
T1/ C4
1.11 Operators Black
& C5/ PO1,2,3/
8 1.12 control flow 8 Board Remember CO 2
Pg61- PSO1,2
1.12.1 Decision making
106
1.13 Arrays T1/C9/ Black
PO1,2,3/
9 1.14 Packages 9,10 Pg187- Board Apply CO 2
PSO1,2
1.15 Java Doc Comments 190

Activities if any:

1. Practice the students to write programs for the basic logic: Quiz

Step 1 : Students were divided into two groups


Step 2 : If one group of students were gave the logic and time
Step 3 : The other group of students were solve the logic using basic concepts
Step 4 : At the end of the activity they learnt how to use the basic sybtax for
different logics.

2. Think and Share program regarding identifying Errors

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.

UNIT II : INHERITANCE AND INTERFACES


Sl. Books/ Teaching Instructional
Lecture PO/
No TOPICS Chapter/ Method/ Delivery CO
hours PSO
. Pages Aids Level
2.1 Inheritance
2.1.1 Types of
Inheritance T1/C8/ Pg Black PO1,2,3/
11 11 Apply CO 3
2.1.2 Super 161-170 Board PSO1,2
classes
2.1.3 Sub classes
2.1.4 Protected
Members
2.2
T1/C8/ Black PO1,2,3/
12 Constructors in 12 Apply CO 3
Pg171-180 Board PSO1,2
sub classes
2.2.1 The object
class
2.3 Abstract
Class
2.3.1 Methods T1/C8/181- Black Apply PO1,2,3/
13 13 CO 3
2.3.2 Final 185 Board PSO1,2
methods and
classes
2.4 Interfaces
2.4.1 Defining an
interface T1/C8/ Black Apply PO1,2,3/
14 14 CO 3
2.4.2 Pg196-200 Board PSO1,2
Implementing
Interface
2.4.3 Difference
between classes Black
T1/C8/ PO1,2,3/
15 and interfaces 15 Board/ Apply CO 3
Pg201-206 PSO1,2
2.4.4 Extending PPT
Interfaces
2.5 Object
T1/C8/ Black PO1,2,3/
16 cloning 16 Apply CO 3
Pg 210-220 Board PSO1,2
2.6 Inner classes
2.7 Array T1/C8/ Black PO1,2,3/
17 17 Apply CO 3
2.8 Lists Pg 225-250 Board PSO1,2
T1/C15/ Black PO1,2,3/
18 2.9 Strings 18 & 19 Apply CO 3
Pg 371-386 Board/PPT PSO1,2

Activities if any:
1. Quiz:

Step1: Students were divided into teams.

Step2:The historical context of Java will be explained.

Step3: Students will go to the Sun website and look up essential Java terms.
Step4:Students will code different program

UNIT III : EXCEPTION HANDLING AND I/O

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

3.4 I/O Basics PO1,2,3,9/


Black
23 23 T1/C13/289 Apply CO 4 PSO1,2
3.4.1 Streams Board
3.4.2 Byte
Streams PO1,2,3,9/
T1/C13/ Black Apply
24 24 CO 4 PSO1,2
3.4.3 character Pg289-293 Board
Streams
3.5 Reading PO1,2,3,9/
T1/C13/ Black Apply
25 and Writing 25 CO 4 PSO1,2
Pg293 Board
console
3.5.1 Console PO1,2,3,9/
26 & T1/C13/ Black Apply
26 Methods and CO 4 PSO1,2
27 Pg293-297 Board
classes
3.6 Reading PO1,2,3,9/
T1/C13/ Black Apply
27 and Writing 28 CO 4 PSO1,2
Pg297-303 Board
files
Revision /
28 Evaluation &
CBS

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

UNIT IV : MULTITHREADING AND GENERIC PROGRAMMING

Sl. Books Teaching Instructional


Lecture PO/
No TOPICS referred/ Method/ Delivery CO
Hour PSO
. Chapter Aids Level
4.1 Difference
between T1/C11/
Black CO PO1,2,3/
29 29 Pg227- Apply
multithreading and Board 5 PSO1,2
230
multitasking
4.2 Thread life T1/C11/ PO1,2,3/
Black CO
30 30 Pg 230- Apply PSO1,2
cycle Board 5
232
4.3 Creating
threads T1/C11/ PO1,2,3/
Black CO
31 31 Pg 232- Apply PSO1,2
4.3.1 synchronizing Board 5
243
threads
4.4 Inter Thread
communication T1/C11/ PO1,2,3/
Black Apply CO
32 32 Pg 243- PSO1,2
4.5 Daemon threads Board 5
250
4.6 Thread groups
4.7 Generic T1/C14/ PO1,2,3/
Black Apply CO
33 33 Pg325- PSO1,2
Programming Board 5
330
4.7.1. Generic
classes T1/C14/ PO1,2,3/
Black CO
34 34 Pg330- Apply PSO1,2
4.7.2 Generic Board 5
339
methods
4.7.3 Bounded Type T1/C14/ PO1,2,3/
Black CO
35 4.7.4 Restrictions 35 Pg340- Apply PSO1,2
Board 5
and Limitations 370
Revision /
36
Evaluation/CBS

Activities if any:
1. Collection of different results

Step1: Students were divided into groups.


Step2: Students will finish the development a program where the logic was given by other
group of students.
Step3: change the sample programs given to them by the teacher so that a different result
occurs.
2. Practice to write a simple projects

Students will present their projects to the class. Questions will be solicited from
other members of the class.

UNIT V: EVENT DRIVEN PROGRAMMING

Sl. Books / Teaching Instructiona


Lectur PO/
No TOPICS Chapte Aids/ l Delivery CO
e Hour PSO
. r Methods Level
5.1 Graphics
Programmin
g T1/C24/ PO1,2,3,4,9,10/
CO
37 36 Pg740- BB/PPT Apply PSO1,2
5.1.1 Frame 6
749
5.1.2
components
5.2 Working
with 2D
shapes T1/C24/ PO1,2,3,4,9,10/
Apply CO
38 5.2.1 Using 37 Pg749- BB/PPT PSO1,2
6
color 768
5.2.2
Fonts,Images
5.3 Basics of
event
Handling T1/C23/ PO1,2,3,4,9,10/
Apply CO
39 5.3.1 Event 38 Pg 707- BB/PPT PSO1,2
6
handlers 720
5.3.2 adapter
classes
5.3.3 actions T1/C23/ PO1,2,3,4,9,10/
5.3.4 mouse 39 & Apply CO
40 Pg720- BB/PPT PSO1,2
40 6
events 733
5.4AWT T1/C24/ PO1,2,3,4,9,10/
Apply CO
41 41 Pg735- PSO1,2
event 6
739
42 5.5 42 T1/C25/ BB/PPT Apply CO PO1,2,3,4,9,10,1
Introcduction Pg773- 6 2/ PSO1,2
to swing 780
5.5.1Layout
management
5.5.2 Swing
components
5.5.3 Text
fields
5.5.4 Text
Areas Buttons
5.5.5 check
boxes
5.5.6 Radio
buttons
5.5.7 Lists T1/C25/ PO1,2,3,4,9,10,1
43 & Apply CO
43 Pg780- BB/PPT 2/ PSO1,2
5.5.8 Choices 44 6
800
5.5.9
Scrollbars
5.6 Windows
T1/C25/ PO1,2,3,4,9,10,1
5.6.1 Menus Apply CO
44 45 Pg801- BB/PPT 2/ PSO1,2
5.6.2 Dialog 6
820
boxes
Revision /
45 Evaluation
&CBS
Activities if any:
*
1. Group Discussion & Quiz done with different group simple projects (steps as in
unit 4)

BB: Black Board PPT: Power Point Presentation


T1: Text Book 1 R1: Reference Book 1
T2: Text Book2

Content beyond Syllabus:


Reason for Content beyond Syllabus:

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

S. No Question Rules Level CO


1. i.Area of triangle and Rectangle using Switch Case Each Apply CO
ii. Write a program to display Program 1,2&3
*
Carries
***
***** 10 Marks
iii.Calculate total and average of students marks using
constructor
iv. Calculate quafric equation
v. Write a program to reverse a number Each
vi. Write a program to reverse the given string
group
vii Write a program to calculate the spaces,special
characters
viii. Find the sum of squares
ix. & X Inheritance with its types and application for
each inheritance
x. Java program to print multiplication table

xi. Java program to convert Fahrenheit to Celsius

xii. Java program to swap two numbers


contains
xiii. Java program to find largest of three numbers 5
members
xiv. Java program to find factorial

xv. Java program print prime numbers

xvi. Java program to check armstrong number


5
xvii. Palindrome in Java
programs
xviii.To find the given year is leap or not given to
each
xix.Find gcd of two numbers using while loop group
xx. Java program for linear search

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

1 Define Objects and classes in java. Remember CO1


2 Name the types of Array. Remember CO1

3 List any four java Doc comments. Remember CO2

4 Define access specifier? Give example. Remember CO2

5 Define objects and object variable. Remember CO2

6 What is the need of overloaded constructors? Remember CO2

7 Describe default constructor, Understand CO2

8 Express what is meant by java package. Understand CO2

9 Enumerate two situations in which static methods are used. Understand CO2

10 Express what is the default access to a member in a class. Understand CO2

11 Illustrate with example how to import a single package? Apply CO2

Show how could Java classes direct program messages to


CO2
12 the system console, but error messages, say to a file. Apply

13 Demonstrate private access specifier. Apply CO2

14 Differentiate procedural Vs object - oriented Programming. Apply CO1

15 Explain the features of Java. Apply CO2

Can an inner class declared inside of method access local


CO2
16 variables of this method? Apply

17 Justify what is the need for javadoc multiline comments. Evaluate CO2

Conclude what can go wrong if you replace && with


& in the following code: String a=null; if (a!=null && CO2
18 Evaluate
a.length()>10) {...}.

Consider a loan processing system in a Bank. Identify the Create CO2


19 classes and objects in system and list them.
Generalize the ways by which the members of a package
CO2
20 can be accessed by other package? Create

6 Marks
Remember
1 Explain the types of package with its importance. CO2

What is method? How method is defined? Give example


2 Remember CO2

What is class? How do you define a class in java. Remember CO1


3

Explain the characteristics of OOPs. Remember CO1


4
Summarize the types of constructors supported by java with
Understand CO2
5 example.

Explain the object constructors and calling other Understand CO2


constructor with example.
6

Demonstrate the static fields and methods used in java. Apply CO2
7

Apply CO2
8 Differentiate constructor and method with example.

Difference between OOPS and procedural programming


9 language. Apply CO1

Assess the different methods in java. Util. Arrays class with Evaluate CO2
10 example.

Create a Java program for push and pop operations in


stack using arrays in classes and object. Create CO2
11

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.

2 Define Package? How does compiler locate packages? Remember CO2


3 Discuss the usage of constructor with an example using java Understand CO2
Explain the features of Java and list out the
4 Understand CO1
characteristics of java.

5 Illustrate OOPS and explain the features of oops Apply CO1

6 Distinguish argument and parameter? Discuss with example. Apply CO2

8 Marks

Write a Java program to Evaluate the following series


1 Apply CO2
1-2+3-4+…+n

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.

2 Illustrate what is polymorphism? Write a java program that Apply CO2


implements Polymorphism.

Illustrate with an example the following features of


constructors:

i. Default constructors

ii. Parameterized constructor


3 Apply CO2
iii. Overloaded constructors

iv. A call to another constructor with this operator

v. An object initialization block

vi. A static initialization block

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.

Create a java program to find a smallest number in the given


array by Create one dimensional array and two dimensional Apply CO2
array using new operator.
3

UNIT II
INHERITANCE AND INTERFACE

BT LEVEL CO
Q.No. QUESTIONS

2Marks

1 Define inheritance hierarchy. Give an example. Remember CO3

2 How will you define an interface in java program. Remember CO3

3 What is meant by abstract classes? Remember CO3

4 What is object cloning? Remember CO3

5 Define static inner classes. Remember CO3

6 What is class hierarchy? Give example. Remember CO3

7 In java describe the use of Interfaces. Understand CO3

8 Describe the purpose of the keyword “final”. Understand CO3

Summarize static binding (early binding) and dynamic


CO3
9 binding (late binding). Understand

Describe wrapper classes? Why the wrapper classes are


defined as final. CO3
10 Understand

11 Show how to prevent inheritance. Apply CO3

Demonstrate the conditions to be satisfied while


declaring abstract classes. CO3
12 Apply

13 Illustrate the usage of super keyword. Apply CO3

14 Differentiate shallow and deep copy in object cloning. Apply CO3


15 Distinguish between copying and cloning. Apply CO3

16 Assess how to reverse ArrayList in java. Apply CO3

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.

If ObjA1 is an object of a class A created using new keyword,


Apply CO3
20 what does the statement A ObjA2=ObjA1.

6 Marks

State the design hints for inheritance. CO3


1 Understand

What is meant by object cloning? Explain it with an example CO3


2 Apply

3 Explain about inner classes and its types with examples CO3
Apply

Write a java program to find the given string is palindrome


or not. CO3
4
Apply
Explain the function of object wrapper and auto boxing
with suitable example.
Apply CO3
6

8 Marks

Demonstrate any six methods available in the StringBuffer


1 CO3
class Apply

How to define an interface? Why do the members of


2 interface are static and final? Apply CO3

Explain the concept of object cloning and inner classes with


3 Apply CO3
examples.

4 Differentiate arrays and strings CO3


Apply
Write a Java program to create a student examination
database system that prints the mark sheet of students.
5 Input student name, marks in 6 subjects. This mark should CO3
be between 0 and 50. If the marks are not in specified Apply
range, exception is thrown else find the total marks and
print percentage of students.

Declare an abstract class to represent a bank account


6 with data members name, account number, address and
abstract methods withdraw and deposit. Method display() is
needed to show balance. Derive a subclass Savings
Account and add the following details: return on CO3
Apply
investment and the method calcAmt() to show the amount in
the account after 1 year. Create instance of Savings
Account and show the use of withdraw and deposit abstract
methods.

13 Marks

Define Inheritance? With diagrammatic illustration


1 and java programs illustrate the different types of CO3
inheritance. Remember

2 What is interface? Write a java program to illustrate


the use of interface. CO3
Remember

3 Write briefly on Abstract classes with an example. Remember CO3

4 List the type of constructors and the concept of


destructor with example. CO3
Remember

5 Describe t h e sophisticated layout management in user


CO3
interface component with example. Understand

6 Summarize the concept of supper classes and sub classes. Understand CO3

7 Illustrate briefly about final methods and classes. Apply CO3

15 Marks

Create a static Inner class called Pair which has MinMax


method for finding min and max values from the array. CO3
1 Apply
Develop an Employee class which implements the
Comparable and Cloneable interfaces. Implement the
sorting of persons (based on name in alphabetical). Also CO3
implement the shallow copy (for name and age) and deep Apply
2 copy (for DateOfJoining).
Develop an Interest interface which contains simple CO3
Interest and comp Interest methods and static final field of
3 Rate 25%. Write a class to implement those methods. Apply
Create a abstract Reservation class which has
Reserve abstract method. Implement the sub-classes like
ReserveTrain and Reserve Bus classes and implement the CO3
4 Apply
same.

UNIT III
EXCEPTION HANDLING AND I/O

BT LEVEL CO
Q.No. QUESTIONS

2 Marks

1 List the different ways to handle exceptions. Remember CO4

Examine the purpose of the finally clause of a


CO4
2 try-catch-finally statement. Remember

3 Tell the use of assert keyword. Remember CO4

4 Define a file? Why do we require files to store data. Remember CO4

What is the basic difference between the 2


CO4
5 approaches to exception handling? Remember

What if there is a break or return statement in try


CO4
6 block followed by. Remember

7 Summarize output streams and input streams in Java. Understand CO4

8 Describe runtime exceptions. Understand CO4

9 Interpret Checked and UnChecked Exception. Understand CO4

10 Give any two methods available in stack tree element. Understand CO4

Is it necessary that each try block must be followed by a


11 Apply CO4
catch block.

12 How are the stream classes classified. Apply CO4

Show how Java handle integer overflows and


13 Apply CO4
underflows.

14 State the difference between an exception and error. Apply CO4

15 Compare Input stream and Reader classes. Apply CO4


Classify the basic difference between the two CO4
16 approaches to exception handling. Apply

Does it matter in what order catch


statements for FileNotFoundException and CO4
17 Apply
IOException are written?

Decide What type of exception must be explicitly


CO4
18 declared in a throws clause of a method? Apply

19 Write a java program to read the file contents. CO4


Apply
Create a Random Access file stream for the file
“student.dat” for uploading the student information in CO4
20 the file. Apply

13 Mark

Define exception. Why it is needed? Explain the


different types of exceptions and the exception CO4
1 hierarchy with appropriate examples using Java. Remember

2 What is mean by filter stream? Explain with examples. Remember CO4

Explain briefly about user defined exceptions and


the concept of throwing and catching exception in java Remember CO4
3 with examples.
What are input and output streams? Explain them with
4 Remember CO4
illustrations.

5 Describe the stack trace elements with an example. Understand CO4

Summarize the concept of streams and stream


CO4
6 classes and their. Understand

Express the most commonly used classes for


CO4
7 handling i/o related exceptions. Understand

How exceptions are handled in Java? Explain the CO4


8 important methods used to handle exception. Apply

While reading a file how would you check whether you


CO4
9 have reached the end of the file. Apply

Explain how to handle arithmetic exception by


CO4
10 giving a suitable example. Apply

Differentiate byte stream and character stream


CO4
11 with necessary examples. Apply
Explain the importance of try - catch block with
12 example. CO4
Apply

Evaluatee a try block that is likely to generate three


types of exception and then incorporate necessary CO4
catch blocks and handle them appropriately. Apply
13

Create a new directory by using File object?


14 CO4
Apply

15 Marks
Why only read() methods in ByteArrayInputStream
does not throw IOException?
CO4
1 Understand

How does InputStream.read() method work? Can you


give me some sample code? CO4
2 Understand

There are three statements in a try block – statement1,


statement2 and statement3. After that there is a catch
block to catch the exceptions occurred in the try block. CO4
3 Assume that exception has occurred in statement2. Apply
Does statement3 get executed or not?
Why it is always recommended that clean up operations
like closing the DB resources to keep inside a finally CO4
4 block? Apply

UNIT IV

MULTITHREADING AND GENERIC PROGRAMMING

BT LEVEL CO
Q.No. QUESTIONS

2 Marks

1 Identify the different states in thread. Remember CO5

2 What do you mean by threads in Java? Remember CO5

3 Define multithreading. Remember CO5

4 List out the motivation needed in generic programming. Remember CO5

5 Tell the methods of executors. Remember CO5


6 What is meant by notify methods in multithreading? Remember CO5

7 Describe synchronization in respect to multithreading, Understand CO5

8 Summarize generic classes with example. Understand CO5

9 Express the need for generic code? Understand CO5

10 Describe life cycle of thread. Understand CO5

11 Demonstrate how do we set priorities for threads. Apply CO5

12 How to start a thread. Understand CO5

13 Show how the inter thread communication is done. Apply CO5

14 Who wants to be generic programmer? Apply CO5

15 Assess how will interrupt threads in multiple windows. Apply CO5

16 Thread is a light weight process. Comment on this statement. Apply CO5

Assess why do we need run() and start() method both?


17 Apply CO5
Can we achieve it with only run method?

Why separate wait and sleep methods used in java


18 Apply CO5
programming?

19 Develop java interface must be implemented by all threads. Apply CO5

Generalize some real life situations that illustrate the


20 Apply CO5
use of multithreading.

7 Markx
Mention the motivations of generic programming.
1 Apply CO5

Explain briefly about generic classes and methods in


2 Apply CO5
Java programming

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

Discuss about translating generic expressions and calling legacy


6 Understand CO5
code

Summarize briefly about thread synchronization with an


7 Understand CO5
example.

Demonstrate Inter thread Communication and suspending,


Understand CO5
8 resuming and stopping threads.

Show how to extend thread class and how to implement


runnable CO5
Understand
9
interface for Create and starting threads.

10 Classify the generics in java with example. Understand CO5

Explain the task for running a task in a separate thread and


running multiple threads. Remember CO5
11

13 Marks

Evaluate how generic methods and generic expressions are


1 Remember CO5
translated.

Design two threads to display odd numbered element in an


2 array of size 50 and even numbered element in another array CO5
of size 50. Create instances of the above thread and run them. Apply

15 Marks

Create a simple real life application program to illustrate


the use of multithreads Apply CO5
1

To avoid deadlock in Java where N threads are accessing N


shared resources: Conclude. CO5
2 Apply

Evaluate which one is better to implement thread in Java?


CO5
3 extending Thread class or implementing Runnable? Apply
Define an exception called “NoMatchException” that is
thrown when a string is not equal to “India”. Create a CO5
4 program that uses this exception. Apply
UNIT V

EVENT DRIVEN PROGRAMMING

Q.N BT LEVEL CO
QUESTIONS
o.

List the situation in which an action event and


1 item event is generated. Remember CO6

Name the Listener methods that must be CO6


2 implemented for the Key Listener interface. Remember

3 What are the steps needed to show a Frame? Remember CO6

4 Define JPanel object. Remember CO6

5 Mention any four event names of a button component. Remember CO6

6 What is meant by window adapter classes? Remember CO6

7 Write syntax of drawimage() and copyArea() methods. Understand CO6

8 Write syntax to handle two mouse events. Understand CO6

9 Describe AWT in java. Understand CO6

Summarize the function of (a) Set Layout and (b) Flow


10 Understand CO6
Layout.

11 How are frames created in Java. Apply CO6


How do you manage the color and font of a graphics in
12 applet. Apply CO6

Show the value for the following predefined actions.


a.SMALL-ICON CO6
13 b.MNEMONIC-KEY Apply

14 Distinguish swing and AWT. Apply CO6

15 Explain four swing components with proper syntax. Apply CO6

16 Differentiate GridBagLayout from GridLayout. Apply CO6

Evaluatee the relationship between event sources and


17 Apply CO6
listeners.

18 Assess the methods under WindowListener Interface. Apply CO6

Create the simple program that displays an empty frame


19 Apply CO6
on the screen.

Code the Graphics method in java to draw the String “


Apply CO6
20 Hello World”.from the coordinates(100,200)

6 Marks

1 What is the process of setting the layout manager? Remember CO6

2 Explain the Swing components in detail. Remember CO6

3 Infer JList and JComboBox with an example Apply CO6

7 Marks

What is layout management? What is the function Remember CO6


1 of Layout manager?

Clasify the classes under 2D shapes Remember CO6


2

3 Apply CO6
Compare check boxes and radio buttons with an example.

8 Marks
1 Create a program use of BorderLayout Apply CO6

2 Write a program to use setBounds() method Apply CO6

3 Which Swing components use ListSelectionModel. Apply CO6


[Hint: The “Use” link at the top of the specification for
each interface and class takes you to a page showing where
in the API that interface or class is referenced.]
Do those components use any other models to handle other
4 aspects of the components’ state? If so, list the other models’ Apply CO6
types

13 Marks

1 Write a program to include the Internal Frame in Swing. Apply CO6

2 List the methods available to draw shapes and COLOR. Remember CO6

State and Explain the basic of AWT Event handling in


3 Remember CO6
detail.

Describe in detail about the different layout in Java


4 CO6
GUI. Which layout is the default one? Understand

Summarize the following in detail: Model, view and


5 controller design pattern with respect to Swing in Java. CO6
How MVC design pattern is achieved? Understand

6 Discuss mouse listener and mouse motion listener. Give CO6


an example program. Understand

Demonstrate the Characteristics of model view


7 Controller design patterns and its advantages with an CO6
Understand
example

Illustrate the usage of special fonts for text in graphics


8 CO6
programming. Understand

Which method do you use to enable and disable


components such as JButtons? What class is it defined in? Apply CO6
9
Code a java program to implement the following:
Create four check boxes. The initial state of the first box
10 should be in checked state. The status of each check box Apply CO6
should be displayed. when we change the state of a
check box, the status should be display is updated
INTERNAL TEST QUESTION PAPER
FORMATS
Marks Distribution for Terminal Tests and Model
Examination

Test Model Total


TT 1 TT 2
Outcomes Exam Marks
CO 1 17 2 19
CO 2 19 17 36
CO3 64 15 79
CO4 49 15 54
CO5 51 23 74
CO6 28 28
Total
100 100 100 300
Marks
Question Paper Format with levels and Marks
Terminal 1

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

Question Paper Format with levels and Marks


Terminal Test 2

Outcomes
CO4 CO5 Total
Levels
Remember 4 4
Understand 49 32 81
Apply 15 15
Apply
Total 49 51 100

Question Paper Format with levels and Marks

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

Overall Level-wise outcome Assessment details


Tests
CO 1 CO 2 CO 3 CO 4 CO 5 CO 6 Total
Levels
Remember 2 2 2 8 14
Understand 4 32 62 64 45 207
Apply 13 2 15 21 51
Apply 28 28
Total 21 36 79 64 74 28 300
UNIVERSITY QUESTION PAPERS
Level and outcome wise analysis
Level Remember Understand Apply
Outcomes
CO 1 1x2 = 2 marks
CO 2 1x2 = 2 marks 2x16 = 32 marks
CO 3 2x2 + 1x16 = 20 marks 1x16 = 16 marks
CO 4 2x2 + 1x 16 = 20 marks 1x 16 = 16 marks
CO 5 2x2 + 1x 16 = 20 marks 1x 16 = 16 marks
CO 6 2x2 = 1x16 = 20 marks 1x16 – 16 marks

Total 4 marks 80 marks 96 marks


CYCLE TESTS AND MODEL QUESTION
PAPERS
Roll No:

M.I.E.T ENGINEERING COLLEGE


Tiruchirappalli
CYCLE TEST - 1
Third Semester
Computer Science and Engineering [Sec: A&B]
CS8391 – Object Oriented Programming
Answer all questions
( 10 x 2 = 20 marks )
S.N
QUESTIONS BT Level
O
1. Define Objects and Classes in java. Remmeber
2. Define access specifier? Give example. Remember
3. Differentiate Procedural vs Object Oriented Programming. Understand
Conclude what can go wrong if you replace && with &
4. in the following code: Understand
String a=null; if (a!=null && a.length()>10) {...}.
Can an inner class declared inside of method, access the local
5. Understand
variables of this method?
6. What is class hierarchy? Give example Remember
7. Describe the purpose of the keyword “final”. Understand
8. Assess how to reverse Array List in java. Understand
Demonstrate the conditions to be satisfied while declaring
9. Understand
abstract classes.
Create a java program to remove all white spaces from a
10. Apply
string in java.
PART-B
(5 x 13 = 65 marks)
S.NO QUESTIONS BT Level
What is method? How method is defined? Give example (6) Understand
State the purpose of finalize() method in java? With an (7)
11.a) example explain how finalize () method can be used in java Understand
program.

(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.

(ii). Define Package? How does compiler locate packages? (7)


Apply
Explain arrays in java?
(i). How to define an interface? Why do the members of (7)
Understand
14.a) interface are static and final?
(ii). Explain about inner classes and its types with examples (6) Understand
(OR)
Define Inheritance? With diagrammatic illustration and (13)
b) Understand
java programs illustrate the different types of inheritance.

(i). Demonstrate any six methods available in the String


(7) Understand
Buffer Class.
15.a)
(ii). What is meant by object cloning? Explain it with an (6)
Understand
example.
(OR)
Describe the sophisticated layout management in user (13)
b) Understand
interface component with example.

PART-C
(1 x 15 = 15 marks)

S.NO QUESTIONS BT Level


16.a) Make a class Student. The Student class has data Apply
members such as roll number, name, and branch. Create a
class called Exam that has data members roll number and
six subject marks. Derive the result class from Student
and Exam it has own data members such as total mark,
and result. Write a Java program to model the
relationships.

(OR)

b) Develop an Employee class which implements the


Comparable and Cloneable interfaces. Implement the
sorting of persons (based on name in alphabetical). Also Apply
implement the shallow copy (for name and age) and deep
copy (for Date Of Joining).

BT LEVEL CO1 CO2 CO3 CO4 CO5 CO6 %

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

DAC Member IQAC Member

Roll No:

M.I.E.T ENGINEERING COLLEGE


Tiruchirappalli
CYCLE TEST - 2
Third Semester
Computer Science and Engineering [Sec: A&B]
Answer all questions
( 10 x 2 = 20 marks )
S.N
QUESTIONS BT Level
O
Examine the purpose of the finally clause of a try-catch-finally
1. Understand
statement.
2. Give any two methods available in stack tree element. Understand
3. How is the stream classes classified? Understand
4. Give any two methods available in stack trace elements. Understand
5. Compare Input Stream and Reader Classes. Understand
6. Define Multithreading. Remember
7. Summarize generic classes with example. Understand
8. Demonstrate how we set priorities for threads. Understand
9. Thread is a light weight process. Comment on this statement. Understand
10. Describe life cycle of thread. Remember

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.

13.a) Describe stack trace elements with an example Understand


(OR)
(i). Mention the motivations of generic programming (7) Understand
b) (ii). Explain briefly about generic classes and methods in java
Understand
programming (8)
What is a thread? Describe the lifecycle and states of threads
14.a) Understand
with example.
(OR)
Explain the steps for running a task in a spate thread and
b) Understand
running multiple threads.
15.a) List the two ways of implementing thrads with example. Understand

(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)

S.NO QUESTIONS BT Level


16.a) Create a simple real life application program to illustrate Apply
the use of multithreads.
(OR)

b) There are three statements in a try block


statement1,statement2 and statement3. After that there is
a catch block to catch the exceptions occurred in the try Aapply
block. Assume that exception has occurred in statement2.
Does statement3 get executed or not?

BT LEVEL CO1 CO2 CO3 CO4 CO5 CO6 %

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:

M.I.E.T ENGINEERING COLLEGE


Tiruchirappalli
MODEL EXAM
Third Semester
Computer Science and Engineering [Sec: A&B]
CS8391 – Object Oriented Programming
Answer all questions
( 10 x 2 = 20 marks )
S.N
QUESTIONS CO
O
1. Express what is the default access to a member in a class. Understand2
Consider a loan processing system in a Bank. Identify the
Understand
2. classes and objects & methods in system to implement the 1
application.
Understand
3. Distinguish between copying and cloning.
2
Understand
4. In java describe the use of Interfaces.
3
Is it necessary that each try block must be followed by a Understand
5. 4
catch block.
Create a Random Access file stream for the file
6. “student.dat” for uploading the student information in the Apply6
file.
7. Define multithreading. Remember5
8. What is meant by notify methods in multithreading? Remember5
Name the listener methods that must be implemented for Understand
9.
the Key Listener interface. 6
Code the Graphics method in java to draw the String “
10. Hello World”. Apply6
from the coordinates(100,200)

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

i. Discuss mouse listener and mouse motion listener. Give an


Apply 6
15.a) example program (7)

ii Write a program to manipulate a simple calculator (6) Apply 6


(OR)
Code a java program to implement the following: Create four
check boxes. The initial state of the first box should be in
b) checked state. The status of each check box should be Apply6
displayed. when we change the state of a check box, the status
should be display is updated

PART-C
(1 x 15 = 15 marks)

S.NO QUESTIONS CO
16.a) i. Infer JList and JComboBox with an example. (8)
Apply6

ii. Compare check boxes and radio buttons with an


Apply
example. (7)

(OR)

b) Create a mobile display using frames and check the


condition to print ok dialogue if we entered 9 digit Apply6
numbers.
BT LEVEL CO1 CO2 CO3 CO4 CO5 CO6 %

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

DAC Member IQAC Member


SAMPLE ANSWER SHEETS
SAMPLE ASSIGNMENTS
ASSESSMENT REPORT

Vous aimerez peut-être aussi