You are on page 1of 4

DAYANANDA SAGAR ACADEMY OF TECHNOLOGY AND MANAGEMENT

(Affilated to Visvesvaraya Technological University,Belagavi & Approved by AICTE,New Delhi)


Opp. Art of Living, Udayapura, Kanakapura Road, Bangalore- 560082

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING


(Accredited 3 years by NBA, New Delhi (Validity: 26-07-2018 to 30-06-2021)

ASSIGNMENT-I (Jan-2019)

SUBJECT: OBJECT ORIENTED CONCEPTS SUBJECT CODE: 18CS45


CLASS: 4TH SEM A & B FACULTY: SHILPA M

Course Outcomes:
CO1: Explain the object-oriented concepts and JAVA.
CO2: Develop computer programs to solve real world problems in Java.
CO3: Develop simple GUI interfaces for a computer program to interact with users, and
to understand the event-based GUI handling principles using Applets and swings.

SI Questions Marks CO
No
1. Explain the concept of object oriented program (08M) Jan 2018 CO1
i) Encapsulation ii) Polymorphism iii) Inheritance

2. a. Explain function prototyping with example. (04M) Jan 2018 CO1

b. Explain function overloading with example (04M) Jan 2018 CO1

3 a. What are static member of a class? Write a C++ program (05M) July 2017 CO1
to count the number of objects created.
b. Differentiate between procedure oriented and object oriented (03M) Jan 2018 CO1
programming.

4 a. What is reference variable? Explain. Also write a program (05M) July 2017 CO1
in C++ to swap two int values and display the values
before and after swapping.
b. How do name space helps in preventing pollution of the (03M) July 2017, CO1
global namespace Jan 2018

5 What is constructor? List the different type of constructors and (08M) Jan 2018 CO1
explain default constructor with example

6 a. What is function polymorphism? Write a program in C++ (04M) July 2017 CO1
using overloaded function area to find area of circle,
triangle and rectangle
b. Explain how one can bridge two classes using friend (04M) July 2017 CO2
function. Write a C++ program to find the sum of two
numbers using bridge friend function add().

7 a. What is type casting? Illustrate with an example. What is (04M) Jan 2018 CO1
meant by automatic type promotion?
b. How ‘compile once and run anywhere’ is implemented in (04M) June 2014, CO1
Java, explain Jan 2013, Jan
2012, July 2017
8 Write a program to calculate the average among the elements {8, (08M) July 2017 CO2
6,2, 7} using for each in java. How for each is different from for
loop?

9 Explain the concepts of arrays in java with examples. Also write (08M) July 2017 CO2
a program that creates and initializes a four integer elements
array. Find the sum and average of its values.

10 a. Explain how java is robust and interactive. (04M) Jan 2018 CO1

b. Write java program to sum only first five elements of the (04M) Jan 2018 CO2
array using for each looping.

11 a. Explain the operation of the following operators with example. (04M) Jan 2018 CO2
i. % ii >>> iii &&

b. Write java program to initialize and display different types of (04M) Jan 2018 CO2
integers and floating point variables.

12 List and explain the Java buzzwords. (08M) Dec 2015, CO1
June 2014, July
2013, Jan 2017,
(08M) July 2017

13a Explain the process of compiling and running a java application, (08M) Jan 2017 CO1
with the help of “Hello World” program.
13b What is type casting? Illustrate with an example. What is meant (06M) Jan 2018 CO1
by automatic type promotion?
14 Explain the structure of a java program and its keywords with an (08 M) June CO1
example 2018
15 Briefly explain the role of interfaces while implementing (08M) July2017 CO1,
multiple inheritance in Java CO2
16 Compare and contrast method overloading and method (08M) July2017, CO1
overriding with suitable examples. Jan2018
17 What are Constructors? Explain the types of constructors and (04M) July 2017 CO1
when constructors are called in the class hierarchy?
18 Define exception. Give the basic form of an exception handling (08M) July2017, CO1,
block. Write a java program for illustrating the exception 2018 CO2
handling when a number is divided by zero
19 What is a thread ? explain 2 ways of creating thread. (08M) Jan 2018 CO1,
CO2
20 With examples, give two uses of super (04M) July 2017 CO1,
21 Define package. What are the steps involved in creating user (08M) Jan2018 CO1,
defined package with an example. Describe the various levels CO2
of access protections available for packages and their
implications.
22 How synchronization can be achieved for threads in Java? (08M) July 2017 CO1,
Explain with syntax CO2
23 a. With syntax, explain use of isAlive() and join() methods. (4M) June 2011, CO1,
July 2017 CO2
b. What is meant by thread priority? How to assign and get the (6M) Jan 2015, CO1,
priority. July 2013. CO2
24 Write short notes on: i) Final class ii) Abstract class. (8M) Dec 2011 CO1,
CO2
25 Write the steps to create Jtable. WAP to create a table with the (08M) July 2013, CO3
column headings Name, USN, age, address & insert records and Jan 2017, July
display 2017
26 Explain briefly the components and containers used in swings (02M) July 2017 CO3
27 Discuss delegation event model with suitable examples. (08M) July CO2
2017,Jan 2018
28 Explain with Syntax: (08M) Jan 2018 CO3
i) JLabel
ii) JText Field
iii) JButton
iv) JCheckBox

29 Create swing applet that has two buttons named bet and gamma. (08M) Jan 2018 CO3
When either of the buttons pressed, it should display ”beta
pressed” and “gamma was pressed” respectively.

30 Explain getDocumentbase and getCodebase in applet class. (08M) Jan 2018 CO3

31 Explain the JScrollPane, JComboBox with example. (8M) Jan 2015 CO3

32 What is producer – consumer problem? Explain the solution for (8M) Dec 2015, CO2
producer – consumer problem with a program. June 2014, Dec
2011.
33 Explain keyEvents and mouseEvent class. (08M) Jan 2018 CO3

34 a. Explain inner class with example (05M) July 2017 CO2

b. Write short notes on Event Listener interface and (08M) July2019 CO3
explain any 2 interfaces with syntax
35 Write a swing applet program to demonstrate withtwo Jbuttons (08M) Jan 2015. CO3
named India and Srilanka. When either of buttons pressed, it
should display respective label with its icon. Refer the image
icons "India.gif"and "Srilanka.gif". Set the initial label is "press
the button".

36 Explain with Syntax: (08M) Jan 2018 CO3


i) JList
ii) JLabel
iii) JImageIcon

You might also like