0% found this document useful (0 votes)
4 views

JAVA Day2 AN (3)

Hi

Uploaded by

ytsyndrone
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

JAVA Day2 AN (3)

Hi

Uploaded by

ytsyndrone
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

QP CODE: S522AN206 Time: 3 Hours

Max Marks: 80 (Q1: 25 marks, Q2: 35 marks, Record: 10 marks, Viva: 10 Marks)

FIFTH SEMESTER BCA PROGRAMME (CBCS)


PRACTICAL EXAMINATION MARCH 2022
Software Lab V

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.

QP CODE: S522AN207 Time: 3 Hours

Max Marks: 80 (Q1: 25 marks, Q2: 35 marks, Record: 10 marks, Viva: 10 Marks)

FIFTH SEMESTER BCA PROGRAMME (CBCS)


PRACTICAL EXAMINATION MARCH 2022
Software Lab V

1. Write an applet program to display the national flag of India.

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)

FIFTH SEMESTER BCA PROGRAMME (CBCS)


PRACTICAL EXAMINATION MARCH 2022
Software Lab V

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

QP CODE: S522AN209 Time: 3 Hours

Max Marks: 80 (Q1: 25 marks, Q2: 35 marks, Record: 10 marks, Viva: 10 Marks)

FIFTH SEMESTER BCA PROGRAMME (CBCS)


PRACTICAL EXAMINATION MARCH 2022
Software Lab V

1. Write an applet program to draw different shapes?


2. A bank maintains two kinds of accounts - Savings Account and Current Account. The
savings account provides compound interest, deposit and withdrawal facilities. The
current account only provides deposit and withdrawal facilities. Current account
holders should also maintain a minimum balance. If balance falls below this level, a
service charge is imposed. Create a class Account that stores customer name, account
number and type of account. From this derive the classes Curr-acct and Sav-acct.
Include the necessary methods in order to achieve the following tasks.
a. Accept deposit from a customer and update the balance
b. Display the balance.
c. Compute interest and add to balance.
d. Permit withdrawal and update the balance ( Check for the minimum balance,
impose penalty if necessary).
QP CODE: S522AN210 Time: 3 Hours

Max Marks: 80 (Q1: 25 marks, Q2: 35 marks, Record: 10 marks, Viva: 10 Marks)

FIFTH SEMESTER BCA PROGRAMME (CBCS)


PRACTICAL EXAMINATION MARCH 2022
Software Lab V

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?

2. Create an interface Department containing attributes deptName and deptHead.it as an


abstract method showData() for printing the attribute. Create a class Hostel containing
hostelname, hostellocation and noofrooms and also have methods readData() and
printData() for reading and printing the details. Then write another class named
Student extending the Hostel class and implementing the Department interface. This
class contains which contains the attributes studname, regno, electivesub and avgmark
and use readData() and showData() for reading and printing the details.

You might also like