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

Java Prac OCT2023

This document is a question bank for a Programming in Java course at Justice Basheer Ahmed Sayeed College for Women. It includes a series of programming tasks that require students to write Java programs and create applets, covering topics such as database connectivity, exception handling, and graphics. The questions are structured to enhance students' understanding of Java programming concepts and practical applications.

Uploaded by

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

Java Prac OCT2023

This document is a question bank for a Programming in Java course at Justice Basheer Ahmed Sayeed College for Women. It includes a series of programming tasks that require students to write Java programs and create applets, covering topics such as database connectivity, exception handling, and graphics. The questions are structured to enhance students' understanding of Java programming concepts and practical applications.

Uploaded by

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

JUSTICE BASHEER AHMED SAYEED COLLEGE FOR WOMEN(AUTONOMOUS)

DEPARTMENT OF COMPUTER SCIENCE

PROGRAMMING IN JAVA

II B.SC. COMPUTER SCIENCE (2022-2025 BATCH)

QUESTION BANK

1. (a) Write a Java program to generate random numbers and order them in ascending order.

(b) Write a Java program and establish database connectivity with the access backend creating an employee
table with following five records.

EMPID EMPNAME EMPSAL EMPDEPT


101 Jack 20000 Clerk
102 Jill 25000 Sales
103 Tom 30000 Marketing
104 Sam 35000 Development
105 Bill 40000 HR

2. (a) Write a Java program to generate 5 random numbers.


(b) Create an applet displaying the text “Java is better than C++” with background color as pink.

3. (a) Write a Java program to generate a vector and display 4 employees name in a company. Also display the
name of the Senior most employee and junior most employee of the company.
(b) Create an applet incorporating graphics and display straight line and oval.

4. (a) Write a Java program to demonstrate point class and its manipulation.
(b) Create an applet incorporating graphics and display a filled Arc and a filled round rectangle.

5. (a) Write a Java program implementing pre defined exception handling.


(b) Create an applet displaying a oval and filled rectangle on the screen.

6. (a) Write a Java program and establish database connectivity with the access backend creating a student table.

REGISTER_NUMBER STU_NAME STU_MARK PASS/FAIL


101 AMAR 86 PASS
102 AKBAR 75 PASS
103 ANNIE 20 FAIL
104 ANTONIE 78 PASS

(b) Create an applet demonstrating different types of layouts.

7. (a) Write a Java program and establish database connectivity with the access backend creating a customer table
4 records.

CUSTOMER_ID PRODUCT_NAME AMOUNT PAYMENT_STATUS


8005 CAKE 100 PAID
8006 ICECREAM 650 PAID
8007 CHOCOLATE 850 PAID
8008 JAM 600 PAID

(b) Create an applet displaying a filled arc on the screen with background color to be yellow.

8. (a)Write a Java program demonstrating user defined exceptions.

(b) Create an applet displaying the string “JUSTICE BASHEER AHMED SAYEED COLLEGE FOR WOMEN” in green
color and with back ground color to be blue.
9. (a) Write a Write a Java program and establish database connectivity with the access backend creating a
customer table with the following 5 records.

CUSTOMER_ID CUSTOMER_NAME AMOUNT DELIVERY_STATUS


7005 TOM 5000 DELIVERED
7006 JAM 2500 DESPATCHED
7007 JILL 3000 BILLED
7008 JACK 7500 DELIVERED
7009 ANN 8000 BILLED

(b) Create an applet demonstrating different fonts with font size = 25, and font style to be Time New Roman.

10.(a) Write a java application to count the number of vowels, consonants, digits and white spaces is the string
“I love my Country”.
(b) Create an applet displaying a line and an oval on the screen with background color to be green.

11. (a) Write a Java program for creating and using a package with package name COMPSCIENCE.
(b) Create an applet displaying a line and a filled round rectangle on the screen with background color to be
orange.

12. (a) Write a Java program implementing a Thread synchronization.


(b) Write a applet program displaying a straight line and a filled rectangle on the screen.

13. (a) Write a Java program and establish database connectivity with the access backend creating a employee table.

EMPID EMPNAME EMPSAL EMPDEPT


101 Jack 20000 Clerk
102 Jill 25000 Sales
103 Tom 30000 Marketing
104 Sam 35000 Development

(b) Create an applet displaying the text “I Love India” with background color green on the screen.

14. (a) Write a java application establishing database connectivity with 4 records in the student table in the
backend.

REGISTER_NUMBER STU_NAME STU_MARK PASS/FAIL


101 AMAR 86 PASS
102 AKBAR 75 PASS
103 ANNIE 20 FAIL
104 ANTONIE 78 PASS

(b) Write a java application using vector class.

15. (a) Create an applet and display various shapes using methods in Graphics class.
(b) Write a Java program demonstrating point class.

16. (a) Write a java application to accept a string and count the number of vowels in the string.
(b) Write a java program to demonstrate exception handling.

17. (a) Write a java code demonstrating the creation and usage of packages.
(b) Write a Java program and establish database connectivity with the access backend creating a student table.

18. (a) Write a java application to accept a string and using a char array counting the number of vowels , digits and
spaces.

(b) Create an applet demonstrating colors.

19. (a) Write a java application to generate 10 random numbers.

(b) Create an applet demonstrating colors with background color to be black and text color be be yellow.

20. (a) Write a java application to demonstrating thread synchronization.

(b) Write a java program to display the different types of layouts.

You might also like