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

Software Lab V Model Questions

Lab

Uploaded by

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

Software Lab V Model Questions

Lab

Uploaded by

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

PRACTICAL EXAMINATION DECEMBER 2018

Software Lab V
Time: 3 hrs.

(Answer both questions)


(Mark distribution: 1st question: 30 2nd question: 20 Record: 10 Viva: 20)
1. Define a class Employee with empno, name, designation. Define a class partEmp
which is the subclass of Employee has its data members as noofhrsworked and
hourlySal. Write a complete program to implement it. (use constructors to initialize
the values. ie pass all the values to initialize the object from main function)

2. Write an applet program to display traffic light

PRACTICAL EXAMINATION DECEMBER 2018


Software Lab V
Time: 3 hrs. Max Marks: 80
(Answer both questions)
(Mark distribution: 1st question: 30 2nd question: 20 Record: 10 Viva: 20)

1. Create an abstract class called Shape with an abstract method area () and variables d1, d2.
Define a constructor for initializing d1& d2. Create subclasses Rectangle, Triangle,
Square and Circle so that area() will calculate area for each shape. (Invoke area() using
the reference variable of Shape) [ USE ABSTRACT CLASS]

2. Write an AWT program to create two buttons namely Green and Red. While clicking the
button Green, the background color of button ‘green’ should become green and while
clicking the button Red the background color of button ‘Red’ should become Red
PRACTICAL EXAMINATION DECEMBER 2018
Software Lab V
Time: 3 hrs.

(Answer both questions)


(Mark distribution: 1st question: 30 2nd question: 20 Record: 10 Viva: 20)

1. Create a class Nationalized with a data members balance, customer name, account
number and suitable member functions. Bank also has 2 methods withdrawal (int
amount) and deposit (intamount, int yrs). Create a subclass of Nationalized named
NewGen.In nationalized bank, the maximum amount that can be withdrawn is 25000
and the minimum balance is 500. The interest rate for fixed deposits is 12.5%. In
NewGen bank the maximum amount withdrawn is 45000 and minimum balance is 0.
The interest rate for fixed deposits is 10.5%. Write a program to display the details of
account in Nationalized and NewGen. (Use dynamic method dispatch)
2. Write an AWT program to handle mouse events

PRACTICAL EXAMINATION DECEMBER 2018


Software Lab V
Time: 3 hrs Max Marks: 80

(Answer both questions)


(Mark distribution: 1st question: 30 2nd question: 20 Record: 10 Viva: 20)

1. Define a Student class(Id, Name, Age) using constructor overloading with different no. of
parameter list. (Overloaded constructor - 1. no argument constructor(intialize members
with some default values). 2. single parameter(initialize only one member variable
and remaining with some default values). 3. pass all values to initialize. 4.
pass the object of Student class itself. Write a complete program to implement this

2. Write a program to check how many characters and how many words in a line of text in
textarea
PRACTICAL EXAMINATION DECEMBER 2018
Software Lab V
Time: 3 hrs.

(Answer both questions)


(Mark distribution: 1st question: 30 2nd question: 20 Record: 10 Viva: 20)

1. Write a package to find out factorial of a number. Import the package to find out nCr
2. Write an AWT program to check a given number is palindrome or not

PRACTICAL EXAMINATION DECEMBER 2018


Software Lab V
Time: 3 hrs. Max Marks: 80

(Answer both questions)


(Mark distribution: 1st question: 30 2nd question: 20 Record: 10 Viva: 20)

1. Define a class employee with empid, empname, empsal as class member variables.
Define a parameterized constructor for assigning initial values. Define one more member
function for finding netpay (netpay = sal+ da (da is 10% of salary)).
2. Write a Java Program that displays a list item containing the names of days in a week. If
the user clicks on each of these days, selected day should be displayed onto a Label
PRACTICAL EXAMINATION DECEMBER 2018
Software Lab V
Time: 3 hrs. Max Marks: 80

(Answer both questions)


(Mark distribution: 1st question: 30, 2nd question: 20, Record: 10 Viva: 20)

1. Define a class Employee with empno, name, designation. Define a class partEmp which
is the subclass Of Employee has its data member as noofhrsworked and hourlySal, Write
a complete program to implement it(use consturctors to initialize the values.)

2. Write an applet program to display a star

PRACTICAL EXAMINATION DECEMBER 2018


Software Lab V
Time: 3 hrs. Max Marks: 80

(Answer both questions)


(Mark distribution: 1st question: 30, 2nd question: 20, Record: 10 Viva: 20)

1. Write a console program to find the reverse of a number and check the number is
palindrome or not

2. Write an applet program to perform various arithmetic operations/calculator


PRACTICAL EXAMINATION DECEMBER 2018
Software Lab V
Time: 3 hrs. Max Marks: 80

(Answer both questions)


(Mark distribution: 1st question: 30, 2nd question: 20, Record: 10 Viva: 20)
1. Define an abstract class Geometry that contains a member variable of type int.
Declare an abstract method findArea(). Derive classes Rectangle, Triangle and
Circle from Geometry class. Override method findArea() to print the area of the
following:

1) Rectangle 2) Triangle 3) Circle.

2. Write an applet program to draw Olympic rings

PRACTICAL EXAMINATION DECEMBER 2018


Software Lab V
Time: 3 hrs. Max Marks: 80

(Answer both questions)


(Mark distribution: 1st question: 30, 2nd question: 20, Record: 10 Viva: 20)

1. Write a java program which will race an exception called ArmstrongException when you
input an Armstrong number

2. Write an applet program to find the sum of two integers (use labels, textboxes and buttons
whenever necessary)
PRACTICAL EXAMINATION DECEMBER 2018
Software Lab V
Time: 3 hrs Max Marks: 80

(Answer both questions)


(Mark distribution: 1st question: 30, 2nd question: 20, Record: 10 Viva: 20)

1. Create a class matrix which contains a 2d integer array, m & n as data member. Include
the following member functions:

a. To read the matrix


b. To display the matrix
c. Display the transpose of the matrix
2. Write an AWT program to create three buttons with names circle, square and triangle.
When we click the button corresponding shape should be displayed

PRACTICAL EXAMINATION DECEMBER 2018


Software Lab V
Time: 3 hrs. Max Marks: 80

(Answer both questions)


(Mark distribution: 1st question: 30, 2nd question: 20, Record: 10 Viva: 20)

1. Write a program to read a number and display:


1. All the prime numbers up to that number
2. All Fibonacci series up to that number

2. Write an applet program to calculate Simple Interest for a given amount

QP_CODE: S5191218F1 Time: 3 Hours


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

Q1. Write an Applet program to draw a line graph with values X= {2010, 2011, 2012, 2013}
y= {250,140,360,220}
Q2.Write a Java program to print sum of digits of a given number. If the number is less than 100
or greater than 999 then throw a user defined exception.

QP_CODE: S5191218F2 Time: 3 Hours

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


10 Marks)

Q1.Write an Applet program to draw the following shape.

Q2.Create an interface Volume, a class Circle and a derived class Cylinder from Volume and
Circle. Volume has member function calculate Volume (), and a constant data member pi(3.14),
Circle has data member readRadius(). Write a java program to compute volume of cylinder using
the above relationship.

QP_CODE: S5191218F3 Time: 3 Hours

Max Marks: 80 (Q1: 25 Marks, Q2: 35 Marks, Record: 10 Marks, Viva: 10 Marks)
Q1.Write a java GUI program to find area of a circle(Area= 𝜋 ∗ 𝑟𝑎𝑑𝑖𝑢𝑠 ∗𝑟𝑎𝑑𝑖𝑢𝑠).

Q2.Design three classes Student, Exam and Result. Student class has data members roll_no and
name. Exam class which is derived from Student class has data members representing marks
scored in six subjects. Results which is derived from Exam class has its own data member total
marks. Write a program to model this relationship.

QP_CODE: S5191218F4 Time: 3 Hours

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

Q1. Create a mysql table employee (empcode int primary key, empname varchar(10), designation
varchar(10)). Write a Java program to read employee details from user and insert it in to the table.

Q2.Write a Java Program to create a class Factorial for computing factorial of number under a user
defined package fact.

QP_CODE: S5191218F5 Time: 3 Hours

Max Marks: 80 (Q1: 25 Marks, Q2: 35 Marks, Record: 10 Marks, Viva: 10 Marks)
Q1. Create a GUI using TextArea, TextField and Button. Delete all occurrences of the TextField
text in the TextArea using Button click.

Q2.Write a Java program to create a class Arithmetic to find the sum of two integers under a user
defined package mypack.

QP CODE: S508FN01

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

FIFTH SEMESTER BCA PROGRAMME (CBCS)


PRACTICAL EXAMINATION NOVEMBER 2023
Software Lab V

1. Write a program using Swing to accept values in two textboxes and display the results of
mathematical operations in the 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: S508FN02 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 NOVEMBER 2023
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 the age of the
student is not between 18 and 25 then generate the user-defined exception
“AgeNotWithinRangeException”. If the name contains numbers or special symbols raise
exception “NameNotValidException”. Define the two exception classes.

QP CODE: S508FN03

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

FIFTH SEMESTER BCA PROGRAMME (CBCS)


PRACTICAL EXAMINATION NOVEMBER 2023
Software Lab V

1. Write a Java program to accept a number then check whether a given number is even or
odd and display the result in the second textbox.
2. Program to create a package named shapes and define abstract class Shape inside it. The
Shape class should have an abstract method getArea(). Define two subclasses Rectangle
and Circle that extend the Shape class and implement the getArea() method. Create a class
FindArea in a different package and use the Rectangle and Circle classes to find the areas
of a rectangle and a circle.

QP CODE: S508FN204 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 NOVEMBER 2023
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 the 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 the balance.
d. Permit withdrawal and update the balance ( Check for the minimum balance,
impose a penalty if necessary).

QP CODE: S523FN101 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 JUNE 2022
Software Lab V

1. Write an applet program to display Olympic rings.

2. Create an abstract class called Figure which contains three data members (length, breadth and
height). Include an abstract method to find the area .Figure class also contains concrete
methods to read the data members and to display them. Derive two classes Rectangle and
Triangle from Figure and override area() to find the area of a rectangle and triangle.

QP CODE: S508FN05

Max Marks: 80 (Q1: 25 marks, Q2: 35 marks, Record: 10 marks, Viva: 10 Marks)
FIFTH SEMESTER BCA PROGRAMME (CBCS)
PRACTICAL EXAMINATION NOVEMBER 2023
Software Lab V

1. Write a swing program to accept a value in a textbox then reverse that number and display
the result in the second textbox.

2. Create an interface Department containing attributes deptName and deptHead. It has 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 you need to write another class
named Student extending the Hostel class and implementing the Department interface.
This class contains the attributes studname, regno, electivesub and avgmark and use
readData() and showData() for reading and printing the details.

QP CODE: S523FN102 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 JUNE 2022
Software Lab V

1. Write a swing program to accept an integer in a textbox then reverse that number and
display the result in the second textbox?

2. Write a java program that implements a multi-thread application that has three threads. First
thread generates a random integer for every one second. second thread computes square of the
number and prints; third thread gives the value of cube of the number?

QP CODE: S523FN103 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 JUNE 2022
Software Lab V
1. Write an applet program to load an image and display it.

2. Write a java program to read n numbers and race an exception called NegativeException
when you input a negative number?

QP CODE: S523FN104 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 JUNE 2022
Software Lab V

1. Write a swing program to accept an integer in a textbox then find the sum of digits of that
number and display the result in the second textbox?

2. Write a java program that implements educational hierarchy using inheritance.

Office
empno:
empname:
salary:
getvalue()

Teaching Teaching

Designation Designation
setvalue() setvalue()

QP CODE: S506FN101 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 2023
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. Write a multithreaded program to print odd numbers and even numbers from two different
threads with suitable delay.

QP CODE: S506FN102 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 2023
Software Lab V

1. Write a swing program to accept an integer in a textbox then reverse that number and
display the result in the second textbox?

2. Create an interface Department containing attributes deptName and deptHead. It has an


abstract method showData() for printing the attributes. 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 which
contains the attributes studname, regno, electivesub and avgmark .Use getData() and
displayData() for reading and printing the details.

QP CODE: S506FN103 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 2023
Software Lab V

1. Write an applet program to load an image and display it.

2. Write a java program to read n numbers and race an exception called NegativeException
when you input a negative number?

QP CODE: S506FN104 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 2023
Software Lab V

1. Write a swing program to accept an integer in a textbox then find the factorial of that
number and display the result in the second textbox?

2. Write a java program that implements educational hierarchy using inheritance.


QP CODE: S506FN105 Time: 3 Hours

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

Office
empno:
empname:
salary:
getvalue()

Teaching N onTeaching

Designation Designation
setvalue() setvalue()
FIFTH SEMESTER BCA PROGRAMME (CBCS)
PRACTICAL EXAMINATION MARCH 2023
Software Lab V

1. Write an applet program to display National flag.

2. Write a package to perform the mathematical operations - Addition, Subtraction,


Multiplication, Division and Modulus. Write a menu driven program for all these
operations and import the package for the above said operations.

QP CODE: S507FN201 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 2023
Software Lab V

1. Write an applet program to draw a Kite?


2. Create an abstract class called Figure which contains three data members (length, breadth
and height). Include an abstract method to find the area .Figure class also contains concrete
methods to read the data members and to display them. Derive two classes Rectangle and
Triangle from Figure and override area() to find the area of a rectangle and triangle.

QP CODE: S507FN202 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 2023
Software Lab V
1. Write a swing program to accept an integer in a textbox then find the factorial of that
number and display the result in the second textbox?
2. Write a java program to find the details of the students eligible to enroll for the examination
(Students, Department jointly give the eligibility criteria for the enrollment class) using
interfaces,

QP CODE: S507FN203 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 2023
Software Lab V

1. Write an applet program to display a star.

2. Define class MyDate with members day, month, year. Define default and parameterized
constructors. Accept values from the command line and create a date object. Throw user
defined exceptions – “InvalidDayException” or “InvalidMonthException” if the day and
month are invalid. If the date is valid, display message “Valid date”.

Students
Department
sno: sno:
sname: attendense:
class: getattendanc e()
getvalue()

Exam

calattendanc e()
bool eligible()
QP CODE: S507FN204 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 2023
Software Lab V

1. Write a program using swing to accept values in two textboxes then find the largest number
and display the result in third text box.

2. Create a package named music and define a class Song inside it. The Song class should
have instance variables title, artist, and duration, and methods play() to play the song, and
displayDetails() to display the song's details. Create another class Music in a different
package and use the Song class to play a song and display its details.

QP CODE: S507FN205 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 2023
Software Lab V

1. Write a swing program to accept a value in a textbox then find the area of a circle and
display the result in the second textbox? (hint : A = πr2 )

2. Create an interface “CreditCardInterface” with methods to viewCreditAmount, viewPin,


changePin, useCard and payBalance. Create a class Customer (name, card number, pin,
creditAmount – initialized to 0). Implement methods viewCreditAmount, viewPin,
changePin and payBalance of the interface. From Customer, create classes
RegularCardHolder (maxCreditLimit) and GoldCardHolder (String specialPrivileges) and
define the remaining methods of the interface.

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

FIFTH SEMESTER BCA PROGRAMME (CBCSS)


PRACTICAL EXAMINATION MARCH 2021
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: S503FN102 Time: 3 Hours

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

FIFTH SEMESTER BCA PROGRAMME (CBCSS)


PRACTICAL EXAMINATION MARCH 2021
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: S503FN103
Max Marks: 80 (Q1: 25 marks, Q2: 35 marks, Record: 10 marks, Viva: 10 Marks)

FIFTH SEMESTER BCA PROGRAMME (CBCSS)


PRACTICAL EXAMINATION MARCH 2021
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: S503FN104 Time: 3 Hours

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

FIFTH SEMESTER BCA PROGRAMME (CBCSS)


PRACTICAL EXAMINATION MARCH 2021
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: S503FN105
Max Marks: 80 (Q1: 25 marks, Q2: 35 marks, Record: 10 marks, Viva: 10 Marks)

FIFTH SEMESTER BCA PROGRAMME (CBCSS)


PRACTICAL EXAMINATION MARCH 2021
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.

S504FN205

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

FIFTH SEMESTER BCA PROGRAMME (CBCSS)


PRACTICAL EXAMINATION MARCH 2021
Software Lab V

1. Write an applet program to display Olympic rings.

2. Write a program that creates three threads. First thread displays “Good Morning” every one second,
the second thread displays “Hello” every two seconds and the third thread displays “Welcome”
every three seconds.
S504FN201

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

FIFTH SEMESTER BCA PROGRAMME (CBCSS)


PRACTICAL EXAMINATION MARCH 2021
Software Lab V

1. Write a swing program to accept a value in a textbox then find the Volume of a sphere and
display the result in the second textbox? (hint :V = 4/3 πr 3 )

2. Create an abstract class called Figure which contains three data members ( length, breadth
and height). Include an abstract method to find the area .Figure class also contains
concrete methods to read the data members and to display them. Derive two classes
Rectangle and Triangle from Figure and override area() to find the area of a rectangle
and triangle.

3. Write a java application program to print odd and even numbers less than 100 using
multithreading

QP CODE: S504FN202 Time: 3 Hours

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

FIFTH SEMESTER BCA PROGRAMME (CBCSS)


PRACTICAL EXAMINATION MARCH 2021
Software Lab V

1. Write a swing program to accept an integer in a textbox then reverse that number and
display the result in the second textbox?

2. Write a java program that implements a multi-thread application that has three threads. First thread
generates a random integer for every one second. second thread computes square of the number and
prints; third thread gives the value of cube of the number?
FIFTH SEMESTER BCA PROGRAMME (CBCSS)
PRACTICAL EXAMINATION MARCH 2021
Software Lab V

1. Write an applet program to load an image and display it.

2. Write a java program to read n numbers and race an exception called NegativeException
when you input a negative number?

QP CODE: S504FN204 Time: 3 Hours

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

FIFTH SEMESTER BCA PROGRAMME (CBCSS)


PRACTICAL EXAMINATION MARCH 2021
Software Lab V

1. Write a swing program to accept an integer in a textbox then find the sum of digits of that
number and display the result in the second textbox?

2. Write a java program that implements educational hierarchy using inheritance.

Office
empno:
empname:
salary:
getvalue()

Teaching Teaching

Designation Designation
setvalue() setvalue()

You might also like