Object Oriented Programming

estrapadesherbetΛογισμικό & κατασκευή λογ/κού

18 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

82 εμφανίσεις

Object Oriented Programming

Assignment Questions

III B.Tech II
Semester (
ECE)

Academic Year: 2012
-
13


Unit
-

V

1.

Consider a student examination database system that prints the mark sheet of students. Input following from
command line: a) students name b) mark
s in six subjects These marks should be between 0 and 50. If the marks are
not in the specified range, raise a RangeException, else find the total marks and print the percentage of the students.

2.

Create user
-
defined exception named CheckArgument to check th
enumber of arguments passed through command
line. If the number of arguments is less than five, throw the ChechArgument exception, else print the addition of all
the five numbers.

3.

Write a short notes on

a) try

b) catch

c) throw

d) throws

e) finally

4.

W
hat is String and StringBuffer class? Explain some of the pre
-

defined methods in String and StringBuffer classes with
examples?

Unit
-

VI

1.

Define each of the following terms

a) Thread

b) multithreading

c) multitasking

d) Preemptive scheduling

2.

If you two

threads in your program, how many threads actually run? Explain the complete flow of threads inside a
program?

3.

Distinguish among each of the following means of pausing threads

a) wait()

b) sleep()

c) blocking I/O

4.

Write short notes on

a) Enumerations

b) Autoboxing

c) Annotations


Unit
-

VII

1.

What do y
ou

mean by event delegation model in java? How do the event objects register the event listeners in java?

2.

Write an AWT program to create checkboxes for different courses belonging to a university such that
courses selected
would be displayed.

3.

Write a temperature conversion program that converts from Fahrenheit to celsius. The fahrenheit temperature
should be entered from keyboard(via textfield). A textfield should be used to display the converted temperature

Use
the following formula for the conversions: celsius =5/9* (fahrenheit
-
32)

4.

What are the different types of AWT components? How are these components added to containers? Explain the
process of creating Frame and adding Button to it?

Unit
-

VIII

1.

Create an
applet to identify the key pressed in the window and display the character associated with the key in status
window?

2.

Create an applet that inherits MouseListener interface and displays appropriate messages for each of the methods in
the interface?

3.

Create a

login form which contains a user id, password field, and two buttons, submit and reset. If the user id,
password field left blank, then no click of submit button, show a message to the user to fill in the fields. On click of
reset button, clear the fields
?

4.

Create two lists using JList class with a button. On click of that button, all selected items in one list are copied to the
other list?