JAVA Day2 AN (3)
JAVA Day2 AN (3)
Max Marks: 80 (Q1: 25 marks, Q2: 35 marks, Record: 10 marks, Viva: 10 Marks)
1. Write a program using swing to accept values in two textboxes and display the results
of mathematical operations in third text box. Use four buttons add, subtract, multiply
and divide.
2. Create a class called Matrix which contains a two dimensional integer array, m, n
(order of the matrix) as data members. Include the following member functions
To read the matrix
To display the matrix
To find the transpose of the matrix.
Max Marks: 80 (Q1: 25 marks, Q2: 35 marks, Record: 10 marks, Viva: 10 Marks)
2. Create a class Student with attributes roll no, name, age and course. If age of student
is not in between 15 and 21 then generate user-defined exception
“AgeNotWithinRangeException”. If name contains numbers or special symbols raise
exception “NameNotValidException”. Define the two exception classes.
QP CODE: S522AN208 Time: 3 Hours
Max Marks: 80 (Q1: 25 marks, Q2: 35 marks, Record: 10 marks, Viva: 10 Marks)
1. Write a java program to accept a number then check whether a given number is positive
or negative and display the result in the second textbox?
2. Write a multithreaded program to print odd numbers and even numbers from two
different threads with suitable delay
Max Marks: 80 (Q1: 25 marks, Q2: 35 marks, Record: 10 marks, Viva: 10 Marks)
Max Marks: 80 (Q1: 25 marks, Q2: 35 marks, Record: 10 marks, Viva: 10 Marks)
1. Write a swing program to accept a value in a textbox then find the factorial of that
number and display the result in the second textbox?