NR-321101 - Object Oriented Programming Systems Through Java
NR-321101 - Object Oriented Programming Systems Through Java
2.a) What are identifiers? List and brief the valid identifiers and invalid identifiers.
b) Write a Java program to find biggest number from a list of 4 elements.
3.a) Describe the differences between while and do loops. Write the syntax of while
and do loops.
b) Write a java program using nested for loop that will print the following out put.
1
1 2
1 2 4
1 2 4 8
1 2 4 8 16
1 2 4 8 16 32
4.a) What is a over loading method? Can you define two methods that have the same
name but different parameter types?
b) Describe the relationship between an object and its defining class. How do you
declare a class?
Contd…..2.
Code No: 321101 :: 2 :: Set No: 1
7.a) How do you run an applet? Describe how the paint ( ) method works in an applet.
b) Describe the procedure to convert an application to an applet and vice versa.
@@@@@
Set No.
1.a) What is an applet? Describe the anatomy of the applet program with an example.
b) What are the advantages of object oriented programming.
2.a) What are data types of Java? Give a brief notes on the Java data types.
b) Write a Java program to convert Fahrenheit to Celsius. The conversion formula is
Celsius = (5/9) * (Fahrenheit - 32)
4.a) What is a method? How do methods are created? How do you invoke a method?
b) Describe the relationship between an object and its defining class. How do you
declare a class? How do you declare an object?
6.a) Describe the drawing methods for lines, rectangles, ovals, arcs and polygons.
b) Describe various user interface components.
7.a) Describe, how the web browser controls and executes the applet.
b) Describe the process of passing parameters to applets.
8.a) How do you throw an exception? What is the keyword throws used for?
b) How do you set a priority for a thread? What is the default priority?
@@@@@
Set No.
2.a) Describe the guidelines for Java programming style and documentation.
b) Write a Java program to find the roots of a quadratic equation.
5.a) Write a method that will check whether a given string is palindrome or not?
b) What are command line arguments? Describe how to pass and process arguments
from the command line.
6.a) What is event driven programming? Describe how events are handled.
b) Write a program to display the calendar of a given month and year.
7.a) With the help of an illustrative example, explain the mechanism of passing
parameters to Java applet.
b) What are keyboard events? Describe their role and importance in Java programs.
8.a) Describe the Java throwable class hierarchy and the types of exceptions.
b) Describe a thread group. How do you create a thread group. Can you control an
individual thread in a thread group?
@@@@@
Set No.
2.a) How do identifiers and data types are handled in Java programs? Give necessary
illustrations.
b) Write a Java program that calculates the area of a circle and displays on monitor.
5.a) Is an array an object or primitive type value? Justify your explanation with
suitable illustrations.
b) Write a Java program to multiply two 2-dimensional matrices. Display the result
on the screen.
7.a) Explain, how do you create a frame from an applet? Can you call an applet from
a frame? Justify your answer.
b) Describe the applet HTML tag. How do you pass parameters to an applet?
8.a) How do you throw an exception? Can you throw multiple exceptions in one
throw statement?
b) Why do you need multithreading capability in applications? In a single-processor
system, how can multiple threads run simultaneously?
@@@@@