Lab Java MyRMwhFBL

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

TILAK MAHARASHTRA VIDYAPEETH, PUNE

BACHELOR OF COMPUTER APPLICATIONS (B.C.A.)


EXAMINATION : DECEMBER 2023
FORTH SEMESTER
Sub:- [BCA-446-20/ BCA-CS-446-20/ BCA-446-18/BCA-447] Lab- Java Programming/
Lab-Java
Date : 13/12/2023 Total Marks : 30/60 Time: 10:00 am to 5:00 pm

Instruction: Bifurcation of marks is as follows


Total Marks 30Marks 60Marks
(for batch2015 to 2019)
Programme 1 15 20
Programme 2 15 20
Viva - 20

1)Write a java program to display alternate character from a given string.


2)Write a java program to accept a number from a user, if it is zero then throw
userdefined Exception “Number is Zero”. If it is non-numeric then
generate an error“Number is Invalid” otherwise check whether it is
palindrome or not.

1) Write a Java program Create abstract class shape. Drive three classes sphere. Cone
and cylinder from it.
Calculate Area and volume of all (use method overriding)

2) Write a program in Java to display following pattern

------------------------------------------------------CUT----------------------------------------------------
1) Write a Java program to convert the temperature in Centigrade to Fahrenheit

Write a Java program to create an interface Shape with the getArea() method.
2) Create three classes Rectangle, Circle, and Triangle that implement the Shape
interface. Implement the getArea() method for each of the three classes.

------------------------------------------------------CUT----------------------------------------------------
1) Write a Java program to check whether the given integer is a prime number or not.

2) Write a java program to accept a number from user, If it is greater than 1000 then throw user
defined exception “Number is out of Range” otherwise display the factors of that number.
(Use static keyword)

[BCA-446-20/ BCA-CS-446-20/ BCA-446-18/BCA-447] Lab- Java Programming 1/2


1) Write a Java program to check whether the given integer is a prime number or not.

2) Write a Java program to display following star pattern.

------------------------------------------------------CUT----------------------------------------------
1) Write a Java Swing program to create a single ball bouncing inside a JPanel.

2) Write a Java program to display following pattern.

----------------------------------------------------CUT-------------------------------------------------
1) Write a Java program to simulate traffic signal using multithreading.

2) Write a Java program to accept two integers from user and swap their values using
temporary variable.
----------------------------------------------------CUT-------------------------------------------------
1) Write a Java program to accept string from user and convert it in opposite case. [Lowercase to
uppercase & vice versa].

2) Write a Java program to create an abstract class Vehicle with abstract methods startEngine() and
stopEngine (). Create subclasses Car and Motorcycle that extend the Vehicle class and implement the
respective methods to start and stop the engines for each vehicle type.

[BCA-446-20/ BCA-CS-446-20/ BCA-446-18/BCA-447] Lab- Java Programming 2/2

You might also like