COMPUTER SCIENCE AND ENGINEERING
OBJECT ORIENTED YEAR OF
CST CATEGORY L T P CREDIT
PROGRAMMING INTRODUCTION
205
USING JAVA
PCC 3 1 0 4 2019
Preamble: The purpose of this course is to enable learners to solve problems by breaking it
down to object level while designing software and to implement it using Java. This course covers
Object Oriented Principles, Object Oriented Programming in Java, Inheritance, Exception
handling, Event handling, multithreaded programming and working with window-based
graphics. This course helps the learners to develop Desktop GUI Applications, Mobile
applications, Enterprise Applications, Scientific Applications and Web based Applications.
Prerequisite: Topics covered under the course PROGRAMMING IN C (EST 102)
Course Outcomes: After the completion of the course the student will be able to
Write Java programs using the object oriented concepts - classes, objects,
CO1 constructors, data hiding, inheritance and polymorphism (Cognitive Knowledge
Level: Apply)
E S . I N
CO2
KTU NOT
Utilise datatypes, operators, control statements, built in packages & interfaces, Input/
Output Streams and Files in Java to develop programs (Cognitive Knowledge Level:
Apply)
Illustrate how robust programs can be written in Java using exception handling
CO3
mechanism (Cognitive Knowledge Level: Understand)
Write application programs in Java using multithreading and database connectivity
CO4
(Cognitive Knowledge Level: Apply)
Write Graphical User Interface based application programs by utilising event
CO5
handling features and Swing in Java (Cognitive Knowledge Level: Apply)
Downloaded from [Link]
COMPUTER SCIENCE AND ENGINEERING
Mapping of course outcomes with program outcomes
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO1
CO2
CO3
CO4
CO5
Abstract POs defined by National Board of Accreditation
PO# Broad PO PO# Broad PO
PO1 Engineering Knowledge PO7 Environment and Sustainability
PO2 Problem Analysis PO8
E S . I N
Ethics
NOT
PO3 Design/Development of solutions PO9 Individual and team work
KTU
Conduct investigations of complex
PO4 PO10 Communication
problems
PO5 Modern tool usage PO11 Project Management and Finance
PO6 The Engineer and Society PO12 Life long learning
Assessment Pattern
Continuous Assessment Tests End Semester Examination
Bloom’s Category
Test1 (Marks %) Test2 (Marks %) Marks (% )
Remember 30 30 30
Understand 30 30 30
Apply 40 40 40
Analyse
Evaluate
Create
Downloaded from [Link]
COMPUTER SCIENCE AND ENGINEERING
Mark Distribution
Total Marks CIE Marks ESE Marks ESE Duration
150 50 100 3 hours
Continuous Internal Evaluation Pattern:
Attendance : 10 marks
Continuous Assessment Tests : 25 marks
Continuous Assessment Assignment : 15 marks
Internal Examination Pattern:
. I N
Each of the two internal examinations has to be conducted out of 50 marks
E S
KTU NOT
First series test shall be preferably conducted after completing the first half of the syllabus and
the second series test shall be preferably conducted after completing remaining part of the
syllabus.
There will be two parts: Part A and Part B. Part A contains 5 questions (preferably, 2 questions
each from the completed modules and 1 question from the partly covered module), having 3
marks for each question adding up to 15 marks for part A. Students should answer all questions
from Part A. Part B contains 7 questions (preferably, 3 questions each from the completed
modules and 1 question from the partly covered module), each with 7 marks. Out of the 7
questions in Part B, a student should answer any 5.
End Semester Examination Pattern: There will be two parts; Part A and Part B. Part A contains
10 questions with 2 questions from each module, having 3 marks for each question. Students
should answer all questions. Part B contains 2 questions from each module of which a student
should answer any one. Each question can have maximum 2 sub-divisions and carry 14 marks.
Downloaded from [Link]
COMPUTER SCIENCE AND ENGINEERING
SYLLABUS
Object Oriented Programming Using Java
Module 1
Introduction:
Approaches to Software Design - Functional Oriented Design, Object Oriented Design, Case
Study of Automated Fire Alarm System.
Object Modeling Using Unified Modeling Language (UML) – Basic Object Oriented concepts,
UML diagrams, Use case model, Class diagram, Interaction diagram, Activity diagram, State
chart diagram.
Introduction to Java - Java programming Environment and Runtime Environment, Development
Platforms -Standard, Enterprise. Java Virtual Machine (JVM), Java compiler, Bytecode, Java
applet, Java Buzzwords, Java program structure, Comments, Garbage Collection, Lexical Issues.
Module 2
Core Java Fundamentals:
Primitive Data types - Integers, Floating Point Types, Characters, Boolean. Literals, Type
. I N
Conversion and Casting, Variables, Arrays, Strings, Vector class.
E S
NOT
Operators - Arithmetic Operators, Bitwise Operators, Relational Operators, Boolean Logical
KTU
Operators, Assignment Operator, Conditional (Ternary) Operator, Operator Precedence.
Control Statements - Selection Statements, Iteration Statements and Jump Statements.
Object Oriented Programming in Java - Class Fundamentals, Declaring Objects, Object
Reference, Introduction to Methods, Constructors, this Keyword, Method Overloading, Using
Objects as Parameters, Returning Objects, Recursion, Access Control, Static Members, Final
Variables, Inner Classes, Command Line Arguments, Variable Length Arguments.
Inheritance - Super Class, Sub Class, The Keyword super, protected Members, Calling Order of
Constructors, Method Overriding, the Object class, Abstract Classes and Methods, using final
with Inheritance.
Module 3
More features of Java:
Packages and Interfaces - Defining Package, CLASSPATH, Access Protection, Importing
Packages, Interfaces.
Exception Handling - Checked Exceptions, Unchecked Exceptions, try Block and catch Clause,
Multiple catch Clauses, Nested try Statements, throw, throws and finally.
Input/Output - I/O Basics, Reading Console Input, Writing Console Output, PrintWriter Class,
Object Streams and Serialization, Working with Files.
Downloaded from [Link]
COMPUTER SCIENCE AND ENGINEERING
Module 4
Advanced features of Java:
Java Library - String Handling – String Constructors, String Length, Special String Operations -
Character Extraction, String Comparison, Searching Strings, Modifying Strings, using valueOf(),
Comparison of StringBuffer and String.
Collections framework - Collections overview, Collections Interfaces- Collection Interface, List
Interface.
Collections Class – ArrayList class. Accessing a Collection via an Iterator.
Event handling - Event Handling Mechanisms, Delegation Event Model, Event Classes, Sources
of Events, Event Listener Interfaces, Using the Delegation Model.
Multithreaded Programming - The Java Thread Model, The Main Thread, Creating Thread,
Creating Multiple Threads, Synchronization, Suspending, Resuming and Stopping Threads.
Module 5
Graphical User Interface and Database support of Java:
Swings fundamentals - Swing Key Features, Model View Controller (MVC), Swing Controls,
Components and Containers, Swing Packages, Event Handling in Swings, Swing Layout
S . I N
Managers, Exploring Swings –JFrame, JLabel, The Swing Buttons, JTextField.
E
KTU
table, delete, insert, select. NOT
Java DataBase Connectivity (JDBC) - JDBC overview, Creating and Executing Queries – create
Text Books:
1. Herbert Schildt, Java: The Complete Reference, 8/e, Tata McGraw Hill, 2011.
2. Rajib Mall, Fundamentals of Software Engineering, 4th edition, PHI, 2014.
3. Paul Deitel, Harvey Deitel, Java How to Program, Early Objects 11th Edition, Pearson,
2018.
Reference Books:
1. Y. Daniel Liang, Introduction to Java Programming, 7/e, Pearson, 2013.
2. Nageswararao R., Core Java: An Integrated Approach, Dreamtech Press, 2008.
3. Flanagan D., Java in A Nutshell, 5/e, O'Reilly, 2005.
4. Barclay K., J. Savage, Object Oriented Design with UML and Java, Elsevier, 2004.
5. Sierra K., Head First Java, 2/e, O'Reilly, 2005.
6. Balagurusamy E., Programming JAVA a Primer, 5/e, McGraw Hill, 2014.
Downloaded from [Link]
COMPUTER SCIENCE AND ENGINEERING
Sample Course Level Assessment Questions
Course Outcome1(CO1): For the following passage develop UML diagrams and then
implement it as a Java program in accordance with your UML design.
Passage: College Office collects semester fee and college bus fee for each student. A
clerk at the college office collects the fees from each student. The bus fee is calculated
depending on the distance of the corresponding bus stop from the college. The semester
fee varies depending upon the semester as well as branch of each student. Students are
supposed to pay the fees in full. Economically backward students are eligible for 50%
discount in semester fee. The consolidated fees receipt is issued to each student by the
clerk, which contains the student name, admission number, semester and branch of
student along with details of fees collected. Students can log in and view the details of
fees remitted and dues if any. The system allows students and clerk level login to the
system. Clerk is able to view reports of each class showing status of fees payment of
each student.
Course Outcome 2(CO2): Write a Java program to evaluate a post fix expression
containing two operands and a single operator using stack. Stack should be implemented
S . I
as a separate entity so as to reflect OOP concepts.
E N
KTU NOT
Course Outcome 3(CO3): Write a program to demonstrate the start, run, sleep and join
methods in Thread class.
Course Outcome 4(CO4): Write a GUI based program with separate buttons to add,
delete and display student details i.e. name, student ID, current semester and branch of
study based on student ID.
Course Outcome 5(CO5): Using Swing create a JFrame with a JLabel and two
JButtons. Set the texts of JButtons as “Yes” and “No” respectively. Set the JLabel’s text
to the text of the button currently being pressed. Initially the JLabel’s text is blank.
Downloaded from [Link]
COMPUTER SCIENCE AND ENGINEERING
Model Question Paper
QP CODE: PAGES:3
Reg No:_______________
Name:_________________
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
THIRD SEMESTER [Link] DEGREE EXAMINATION, MONTH & YEAR
Course Code: CST 205
Course Name: Object Oriented Programming using Java
[Link] Duration: 3 Hours
PART A
Answer all Questions. Each question carries 3 Marks
1. Briefly explain the portable, secure and robust features of Java.
. I N
2. Describe the concepts of object and class with a suitable Java program.
E S
KTU NOT
3. Explain the concept of method overriding with an example.
4. What is the use of the keyword final in Java?
5. Explain the concept of streams.
6. Explain any two applications of Serialization.
7. Distinguish the usage of “==” and equals() method when comparing String type?
8. What are Collections in Java? Explain any one Collection interface in Java.
9. Explain any two properties of Swing components in Java.
10. Explain JLabel component. With suitable examples explain any two of its constructors.
Part B
Answer any one question completely from each module
11.
(a) Describe in detail any three Object Oriented Programming principles. Illustrate with
suitable examples.
(9)
Downloaded from [Link]
COMPUTER SCIENCE AND ENGINEERING
(b) What is Java Runtime Environment? What is the role of Java Virtual Machine in it?
(5)
OR
12.
(a) Compare and contrast Java standard edition and Java enterprise edition.
(5)
(b) Why is Java considered to be platform independent? What is the role of Bytecode in
making Java platform independent?
(9)
13.
(a) Explain in detail the primitive data types in Java.
(8)
(b) Explain automatic type conversion in Java with an example. What are the two
conditions required for it?
(6)
OR
14.
S . I N
(a) Using a suitable Java program explain the difference between private and public
E
NOT
members in the context of inheritance.
KTU
(8)
(b) Is it possible to use the keyword super within a static method? Give justification for
your answer.
(6)
15.
(a) Explain in detail about byte streams and character streams with suitable code
samples.
(6)
(b) Describe in detail about exception handling, try block and catch clause with the help
of a suitable Java program.
(8)
OR
16.
(a) Explain object streams in Java. Explain the role of Serializable interface with a
suitable code sample.
(8)
(b) Explain throw, throws and finally constructs with the help of a Java program.
(6)
Downloaded from [Link]
COMPUTER SCIENCE AND ENGINEERING
17.
(a) Describe in detail the creation of a thread using the Runnable interface and the
Thread class with suitable examples.
(10)
(b) Explain List Interface. Mention any two exceptions thrown by its methods.
(4)
OR
18.
(a) Explain in detail the Delegation Event model for event handling in Java.
(7)
(b) Write a simple program by extending appropriate class to demonstrate the working of
threads in java.
(7)
19.
(a) Write a Java program to demonstrate the use of JLabel and JButton by adding them
to JFrame.
(7)
(b) Explain step-by-step procedure of using Java DataBase Connectivity in Java
programs.
E S . I N (7)
20.
KTU NOT OR
(a) Explain the class hierarchy of Java Swing components.
(7)
(b) Write a Java Program to create a student table and to add student details to it using
JDBC.
(7)
Downloaded from [Link]
COMPUTER SCIENCE AND ENGINEERING
Teaching Plan
Module 1 : Introduction (8 hours)
Approaches to Software Design- Functional Oriented Design, Object-
1.1 1 hour
Oriented Design, Case Study of Automated Fire Alarm System.
1.2 Object Modeling Using UML – Basic object oriented concepts 1 hour
1.3 Basic object oriented concepts 1 hour
1.4 UML diagrams, Use case model 1hour
1.5 Class diagram, Interaction diagram 1hour
1.6 Activity diagram, State chart diagram 1hour
Java programming Environment and Runtime Environment,
1.7 Development Platforms -Standard, Enterprise. JVM, Java compiler, 1hour
Bytecode
Java applet, Java Buzzwords, Java program structure, Comments,
1.8
S
Garbage Collection, Lexical Issues
E . I N 1hour
2.1 KTU NOT
Module 2: Core Java Fundamentals
Core Java Fundamentals: Primitive Data types, Integers, Floating
(11 hours)
1 hour
Point Types, Characters, Boolean
Literals, Type Conversion and Casting, Variables, Arrays, Strings,
2.2 1 hour
Vector class.
Operators: Arithmetic Operators, Bitwise Operators, Relational
2.3 Operators, Boolean Logical Operators, Assignment Operator, 1 hour
Conditional (Ternary) Operator, Operator Precedence.
Control Statements: Selection Statements, Iteration Statements and
2.4 1 hour
Jump Statements.
Object Oriented Programming in Java: Class Fundamentals, Declaring
2.5 1 hour
Objects, Object Reference, Introduction to Methods
Constructors, this Keyword, Method Overloading, Using Objects as
2.6 1 hour
Parameters
2.7 Returning Objects, Recursion, Access Control, static Members 1 hour
Downloaded from [Link]
COMPUTER SCIENCE AND ENGINEERING
Final Variables, Inner Classes, Command-Line Arguments, Variable
2.8 1 hour
Length Arguments
Inheritance : Super class, Sub class, the keywords super, protected
2.9 1 hour
Members,
2.10 Calling Order of Constructors, Method Overriding, the Object class, 1 hour
2.11 Abstract Classes and Methods, Using final with Inheritance 1 hour
Module 3: More features of Java (8 hours)
Packages and Interfaces: Defining Package, CLASSPATH, Access
3.1 1 hour
Protection, Importing Packages
3.2 Interfaces 1 hour
Input / Output: I/O Basics, Reading Console Input, Writing Console
3.3 1 hour
Output, PrintWriter Class
3.4 Object Streams and Serialization 1 hour
3.5 Working with Files 1 hour
3.6
E S . I N
Exception Handling: Checked Exceptions, Unchecked Exceptions, try
1 hour
Block and catch Clause
N OT
3.7
3.8 K TU
Multiple catch Clauses, Nested try Statements
throw, throws and finally
1 hour
1 hour
Module 4:Advanced features of Java (10 hours)
Java Library: String Handling – String Constructors, String Length,
4.1 1hour
Special String Operations
Character Extraction, String Comparison, Searching Strings,
4.2 Modifying Strings Using valueOf( ), Comparison of String Buffer 1hour
and String.
Collections framework – Collections overview, Collections Interfaces-
4.3 1hour
Collection Interface
4.4 List Interface, Collections Class – ArrayList Class 1hour
4.5 Accessing Collections via an Iterator. 1hour
Event handling: Event Handling Mechanisms, Delegation Event
4.6 1hour
Model
4.7 Delegation Event Model, Event Classes 1hour
Downloaded from [Link]
COMPUTER SCIENCE AND ENGINEERING
Sources of Events, Event Listener Interfaces, Using the Delegation
4.8 1hour
Model
Multithreaded Programming: The Java Thread Model, The Main
4.9 1hour
Thread, Creating Thread
Creating Multiple Threads, Synchronization, Suspending, Resuming
4.10 1hour
and Stopping Threads.
Module 5: Graphical User Interface and Database support of Java (8 hours)
5.1 Swings fundamentals, Swing Key Features 1hour
5.2 MVC, Swing Controls, Components and Containers 1hour
5.3 Swing Packages, Event Handling in Swings. 1 hour
5.4 Swing Layout Managers 1hour
5.5 Exploring Swings –JFrame, JLabel, The Swing Buttons, JTextField. 1 hour
JDBC overview, Creating and Executing Queries – create table,
5.6 1hour
delete, insert, select (Basics only, DBMS course is not a prerequisite).
5.7
. I N
Creating and Executing Queries – create table, delete, insert, select.
E S
1 hour
5.8
OT
Creating and Executing Queries – create table, delete, insert, select.
N
1 hour
K TU
Downloaded from [Link]