0% found this document useful (0 votes)
50 views12 pages

Object Oriented Concepts

The document outlines the course CST455: Introduction to Object Oriented Concepts, focusing on problem-solving through object-oriented design and implementation using Java. It covers key topics such as object-oriented principles, exception handling, multithreading, and GUI programming, with specified course outcomes and assessment patterns. Prerequisites include a background in programming languages, and the course aims to equip students with skills to develop various applications.

Uploaded by

kaneki1232001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views12 pages

Object Oriented Concepts

The document outlines the course CST455: Introduction to Object Oriented Concepts, focusing on problem-solving through object-oriented design and implementation using Java. It covers key topics such as object-oriented principles, exception handling, multithreading, and GUI programming, with specified course outcomes and assessment patterns. Prerequisites include a background in programming languages, and the course aims to equip students with skills to develop various applications.

Uploaded by

kaneki1232001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

COMPUTER SCIENCE AND ENGINEERING

YEAR OF
OBJECT ORIENTED CATEGORY L T P CREDIT
CST455 INTRODUCTION
CONCEPTS
OEC 2 1 0 3 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, Exception handling, Event handling,
multithreaded programming and working with window-based graphics. This course provides
learners the basics to develop Mobile applications, Enterprise Applications, Scientific
Applications and Web based Applications.

Prerequisite: A sound background in any of the programming languages like C, C++, Python etc
is mandatory. Students who completed the minor stream course CST 281 Object Oriented
Programming are not allowed to choose this Open Elective Course.

Course Outcomes: After the completion of the course the student will be able to

Develop Java programs using the object-oriented concepts - classes, objects,


CO1 constructors, data hiding, inheritance and polymorphism (Cognitive Knowledge
Level: Apply)

Utilise data types, operators, control statements, built in packages & interfaces,
CO2 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: Apply)

Develop application programs in Java using multithreading (Cognitive Knowledge


CO4
Level: Apply)

Develop Graphical User Interface based application programs by utilising event


CO5
handling features and Swing in Java (Cognitive Knowledge Level: Apply)

Downloaded from Ktunotes.in


COMPUTER SCIENCE AND ENGINEERING

Mapping of course outcomes with program outcomes

PO PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO1 PO11 PO1
1 0 2

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 Ethics

PO3 Design/Development of solutions PO9 Individual and team work

Conduct investigations of
PO4 complex problems PO10 Communication

PO5 Modern tool usage PO11 Project Management and Finance

PO6 The Engineer and Society PO12 Life long learning

Downloaded from Ktunotes.in


COMPUTER SCIENCE AND ENGINEERING

Assessment Pattern

Continuous Assessment Tests


Bloom’s End Semester
Category Examination Marks
Test 1 (%) Test 2 (%) (%)

Remember 20 20 20

Understand 40 40 40

Apply 40 40 40

Analyze

Evaluate

Create

Mark Distribution

Total Marks CIE Marks ESE Marks ESE Duration

150 50 100 3

Continuous Internal Evaluation Pattern:


Attendance 10 marks
Continuous Assessment Tests(Average of Internal Tests1&2) 25 marks

Continuous Assessment Assignment 15 marks

Internal Examination Pattern


Each of the two internal examinations has to be conducted out of 50 marks. 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 completed 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

Downloaded from Ktunotes.in


COMPUTER SCIENCE AND ENGINEERING

from the partly completed module), each with 7 marks. Out of the 7 questions, a student should
answer any5.

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 full questions from each module of which student should answer any one. Each
question can have maximum 2 sub-divisions and carries 14 marks.
Syllabus
Module – 1 (Object Orientation and Java basics)
Object Orientation Principles – Object and Class, Data abstraction and Encapsulation,
Inheritance, Polymorphism, Dynamic binding, Message communication, Benefits of using
Object orientation.
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.

Primitive Data types - Integers, Floating Point Types, Characters, Boolean. Literals, Type
Conversion and Casting, Variables, Arrays, Strings, Vector class.

Module – 2 (Core Java Fundamentals)


Operators - Arithmetic Operators, Bitwise Operators, Relational Operators, Boolean Logical
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,
Command-Line Arguments, Variable Length Arguments.

Module - 3 (More features of Java)


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.

Packages and Interfaces - Defining Package, CLASSPATH, Access Protection, Importing


Packages, Interfaces.

Downloaded from Ktunotes.in


COMPUTER SCIENCE AND ENGINEERING

Exception Handling - Checked Exceptions, Unchecked Exceptions, try Block and catch Clause,
Multiple catch Clauses, Nested try Statements, throw, throws and finally.

Module - 4 (Advanced features of Java)


Input/Output - I/O Basics, Reading Console Input, Writing Console Output, PrintWriter Class,
Reading and Writing Files.

Java Library - String Handling – String Constructors, String Length, Special String Operations -
Character Extraction, String Comparison, Searching Strings, Modifying Strings, Using
valueOf(), Comparison of String Buffer and String.

Module - 5 (GUI Programming, Event Handling and Multithreaded Programming)


Multithreaded Programming - The Java Thread Model, The Main Thread, Creating Thread,
Creating Multiple Threads, Suspending, Resuming and Stopping Threads.

Event Handling - Event Handling Mechanisms, Delegation Event Model, Event Classes, Sources
of Events, Event Listener Interfaces, Using the Delegation Model.

Swing Fundamentals - Swing Key Features, Model View Controller (MVC), Swing Controls,
Components and Containers, Exploring Swing - JFrame, JLabel, JButton, JTextField.

Text Books
1. Herbert Schildt, Java: The Complete Reference, 8/e, Tata McGraw Hill, 2011.
2. Balagurusamy E., Programming JAVA a Primer, 5/e, McGraw Hill, 2014.

Reference Books
1. Paul Deitel, Harvey Deitel, Java How to Program, Early Objects 11/e, Pearson, 2018.
2. Y. Daniel Liang, Introduction to Java Programming, 7/e, Pearson, 2013.
3. Nageswararao R., Core Java: An Integrated Approach, Dreamtech Press, 2008.
4. Flanagan D., Java in A Nutshell, 5/e, O'Reilly, 2005.
5. Sierra K., Head First Java, 2/e, O'Reilly, 2005.

Downloaded from Ktunotes.in


COMPUTER SCIENCE AND ENGINEERING

Course Level Assessment Questions


Course Outcome1 (CO1):
1. Three types of employees work in an organization: Regular, Contract and Hourly.
Regular employees are permanent workers of the organization. Their salary is computed
as the sum of basic pay, DA (50% of basic pay) and HRA. Contract employees work for
the organization only for the contract period and earn a fixed salary. Hourly employees
work for a fixed number of hours each day. Their salary is computed based on the total
number of hours worked.
Using object oriented principles, write a Java program to prepare pay roll of the
organization.
2. Write a java program to create an abstract class named Shape that contains two integers
and an empty method named printArea(). Provide three classes named Rectangle, Square,
Triangle and Circle with proper class hierarchy. Each one of the classes contain only the
method printArea( ) that prints the area of the given shape.

Course Outcome 2(CO2):


1. Write a Java program that reads a file and displays the file on the screen, with a line
number before each line.
2. Write a Java program to prepare the rank list of computer science students based on
their performance in the first Semester B.Tech. Degree examination at APJ Abdul
Kalam Technological University. The output should be stored in a file.

Course Outcome 3(CO3):


1. Write a program to demonstrate the use of throws clause to handle an exception occurred
within a method.
2. Write a program to demonstrate how exception handling is supported in Java.

Course Outcome 4(CO4):


1. Write a program to compute the sum of elements in an array using two threads in a parallel
way. The first thread sums up the first half of the array and the second thread sums up the
second half of the array. Finally, the main thread adds these partial sums and prints the
result.
2. Write a java program that implements a multi-thread application that has three threads.
First thread generates random integer every 1 second and ifthe value is even, second
thread computes the square of the number and prints. If the value is odd, the third thread
will print the value of cube of the number.

Downloaded from Ktunotes.in


COMPUTER SCIENCE AND ENGINEERING

Course Outcome 5(CO5):


1. Write a GUI based program to convert temperature from degree Celsius to Fahrenheit.
2. Write a java program that simulates a traffic light. The program lets the user select one of
three lights: red, yellow, or green with buttons. On selecting a button, an appropriate
message with “stop” or “ready” or “go” should appear above the buttons in a selected
color. Initially there is no message shown.

Model Question Paper


QP CODE:

Reg No: _______________

Name: _________________ PAGES :4

APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY

SEVENTH SEMESTER B.TECH DEGREE EXAMINATION, MONTH & YEAR

Course Code: CST455

Course Name: Object Oriented Concepts

Max.Marks:100 Duration: 3 Hours

PART A

Answer All Questions. Each Question Carries 3 Marks

1. Java is considered to be secure and portable. Justify this statement.

2. Describe the concept of dynamic binding.

3. Explain the different arithmetic operators in Java.

4. What does the following Java function compute? Justify your answer.
intgreater(int a, int b)
{
while(a!=b)
{

Downloaded from Ktunotes.in


COMPUTER SCIENCE AND ENGINEERING

if(a>b)
a=a-b;
else
b=b-a;
}
return a;
}

5. Explain the use of CLASSPATH with an example.

6. What are the different types of exceptions?

7. Explain file handling features available in Java.

8. Write a simple program to read an integer value from console and print it.

9. Explain the concept of main thread in multi-threading.

10. Explain any two Event classes in Java. (10x3=30)

Part B
(Answer any one question from each module. Each question carries 14 Marks)

11. (a) Describe in detail polymorphism, abstraction and inheritance with suitable (9)
examples.

(b) What is Java Virtual Machine? (5)

OR

12. (a) Explain the salient features of Java language. How does Java Enterprise (9)
Edition (J2EE) differ from Java Standard Edition (Java SE)?

(b) Explain the declaration and use of multi-dimensional array variables in Java, (5)
with example.

13. (a) Explain iteration control statements in Java. Give examples. (8)

Downloaded from Ktunotes.in


COMPUTER SCIENCE AND ENGINEERING

(b) Write a recursive program to compute the factorial of a number. (6)

OR

14. (a) Using a suitable Java program, explain the concept of methods and (6)
constructors.

(b) Write a Java program that prompts the user for an integer and then prints out (8)
all the prime numbers up to that number.

15. (a) In a table format, show the effect of access specifiers within and outside (6)
packages in Java.

(b) Describe exception handling using try block and catch clause in Java with the (8)
help of a suitable Java program.

OR

16. (a) What is an interface in Java? Explain with a suitable example. (6)

(b) Write a program that perform integer divisions. The user enters two input data (8)
(any data type) through console into variables Num1 and Num2. If Num1 or
Num2 were not an integer, the program would throw a Number Format
Exception. If Num2 were Zero, the program would throw an Arithmetic
Exception. Display the appropriate exception or result.

17. (a) Write a Java program that displays the number of characters, lines and words (8)
in a text file.

(b) Explain any three String constructors with the help of sample code for each. (6)

OR

18. (a) Write a program to demonstrate the usage of the PrintWriter class. (7)

(b) Write a Java program for sorting a given list of names in ascending order. (7)

19. (a) Explain Delegation Event model for event handling in Java. (7)

(b) Write a program to compute the sum of elements in an array using two (7)

Downloaded from Ktunotes.in


COMPUTER SCIENCE AND ENGINEERING

threads in a parallel way. The first thread sums up the first half of the array
and the second thread sums up the second half of the array. Finally, the main
thread adds these partial sums and prints the result.Use Runnable interfacefor
the creation of a thread.

OR

20. (a) What are the differences between a process and a thread? (4)

(b) Write a Graphical User Interface (GUI) based Java program to implement a (10)
simple calculator supporting the operations addition, subtraction,
multiplication and division. Use Swing controls to implement GUI. There
may be three text boxes, the first two for accepting the operands and the last
for displaying the result. Add four buttons for the above operations. Write
neat comments in your program to show how you handle events.

Teaching Plan

No. of
Lecture
No Contents Hours
(36hrs)

Module – 1 (Object Orientation and Java basics) (7 hrs)

Object Orientation Principles – Object and Class, Data abstraction and


1.1 1 hour
Encapsulation

1.2 Inheritance, Polymorphism 1 hour

Dynamic binding, Message communication, Benefits of using Object


1.3 1 hour
orientation.
Java programming Environment and Runtime Environment,
1.4 Development Platforms -Standard, Enterprise. JVM, Java compiler, 1 hour
Bytecode

Java applet, Java Buzzwords, Java program structure, Comments, Garbage


1.5 1 hour
Collection, Lexical Issues

1.6 Primitive Data types - Integers, Floating Point Types, Characters, Boolean 1 hour

1.7 Literals, Type Conversion and Casting, Variables, Arrays, Strings, Vector 1 hour

Downloaded from Ktunotes.in


COMPUTER SCIENCE AND ENGINEERING

class.

Module - 2 (Core Java Fundamentals) (7 hrs)


Operators - Arithmetic Operators, Bitwise Operators, Relational
2.1 Operators, Boolean Logical Operators, Assignment Operator, 1 hour
Conditional (Ternary) Operator, Operator Precedence.

Control Statements - Selection Statements, Iteration Statements and Jump


2.2 1 hour
Statements.
Object Oriented Programming in Java - Class Fundamentals,
2.3 1 hour
Declaring Objects

2.4 Object Reference, Introduction to Methods, Constructors, this Keyword 1 hour

2.5 Method Overloading, Using Objects as Parameters, Returning Objects 1 hour

2.6 Recursion, Access Control, static Members 1 hour

2.7 Command-Line Arguments, Variable Length Arguments 1 hour

Module - 3 (More features of Java) (8 hrs)


3.1 Inheritance - Super class, Sub class, the keyword super, protected Members 1 hour

3.2 Calling Order of Constructors, Method Overriding, the Object class 1 hour

3.3 Abstract Classes and Methods, Using final with Inheritance 1 hour

Packages and Interfaces - Defining Package, CLASSPATH, Access


3.4 1 hour
Protection

3.5 Importing Packages, Interfaces 1 hour

Exception Handling - Checked Exceptions, Unchecked Exceptions, try


3.6 1 hour
Block and catch Clause

3.7 Multiple catch Clauses, Nested try Statements 1 hour

3.8 throw, throws and finally 1 hour

Module - 4 (Advanced features of Java) (6 hrs)


4.1 Input/Output - I/O Basics, Reading Console Input 1 hour

4.2 Writing Console Output, PrintWriter Class 1 hour

4.3 Working with Files (Lecture-1) 1 hour

Downloaded from Ktunotes.in


COMPUTER SCIENCE AND ENGINEERING

4.4 Working with Files (Lecture-2) 1 hour

4.5 Java Library - String Handling – String Constructors, String Length 1 hour

Special String Operations - Character Extraction, String Comparison,


4.6 Searching Strings, Modifying Strings, Using valueOf( ), Comparison of 1 hour
StringBuffer and String.
Module - 5 (GUI Programming, Event Handling and Multithreaded
Programming) ( 8hrs)

Multithreaded Programming - The Java Thread Model, The Main Thread,


5.1 1 hour
Creating Thread

5.2 Creating Multiple Threads 1 hour

5.3 Suspending, Resuming and Stopping Threads. 1 hour


Event handling - Event Handling Mechanisms, Delegation Event
5.4 1 hour
Model

5.5 Event Classes,Sources of Events, Event Listener Interfaces 1 hour

5.6 Using the Delegation Model, Swing fundamentals, Swing Key Features 1 hour

Model View Controller (MVC), Swing Controls, Components and


5.7 1 hour
Containers

5.8 Exploring Swing –JFrame, JLabel, JButton, JTextField 1 hour

Downloaded from Ktunotes.in

You might also like