0% found this document useful (0 votes)
134 views29 pages

Finalslipsjava 1

The documents provide instructions for 10 practical exams on Java programming. The exams cover topics like threads, collections, I/O and databases. Students will complete programming tasks and there will be a viva voce round.

Uploaded by

vivekdj048
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views29 pages

Finalslipsjava 1

The documents provide instructions for 10 practical exams on Java programming. The exams cover topics like threads, collections, I/O and databases. Students will complete programming tasks and there will be a viva voce round.

Uploaded by

vivekdj048
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Savitribai Phule Pune University

T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination


CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1.Write a Java program to display all the alphabets between ‘A’ to ‘Z’ after every 2 seconds.
[15M]

2. Write a Java program to accept the details of Employee(Eno, EName, Designation,


Salary)from a user and store it in to the database. (UseSwing) [15M]

3.Viva [05M]

1
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1.Write a java program to read ‘N’ names of your friends, store it into HashSet and display
the min ascending order. [15M]

2.Write a program to solve producer consumer problem in which a producer


produces a value and consumer consume the value before producer generate the
next value.(Hint:use thread synchronization) [15M]

3.Viva [05M]

2
Savitribai Phule Pune University
T.Y.B.Sc.(ComputerScience)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
PracticalDuration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1.Write a program in which thread sleep for 6 sec in the loop in reverse order
from 100 to 1 and change the name of thread. [15M]

2.Write a Java program to create LinkedList of String objects and perform the following:
i. Add element at the end of the list
ii. Delete first element of the list
iii. Display the contents of list inreverse order [15 M]

3.Viva [05M]

3
Savitribai Phule Pune University
T.Y.B.Sc.(ComputerScience)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a Java program using Runnable interface to blink Text on the frame.[15M]

2. Write a Java program to store city names and their STD codes using an appropriate
collection and perform following operations:
i. Add a new city and its code(Noduplicates)
ii. Remove a city from the collection
iii. Search for a city name and display the code [15 M]

3. Viva [05M]

4
SavitribaiPhulePuneUniversity
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming usingJava–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a Java program to accept ‘n’ integers from the user and store them in a collection.
Display them in the sorted order. The collection should not accept duplicate elements.
(Useasuitablecollection).Searchforaparticularelementusingpredefinedsearchmethod
intheCollection framework. [15M]

2. Write a java program to simulate traffic signal using threads. [15 M]

3. Viva [05M]

5
Savitribai Phule Pune University
T.Y.B.Sc.(ComputerScience)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a java program that implements a multi-thread application that has three threads.
First thread generates random integer number after every one second, if the number is
even; second thread computes the square of that number and print it. If the number is
odd, the third thread computes the of cube of that number and print it.[15M]

2. Write a java program for the following:


i. To create a Product(Pid, Pname, Price)table.
ii. Insert at least five records into the table.
iii. Display all the records from a table. [15 M]

3. Viva [05M]

6
Savitribai Phule Pune University
T.Y.B.Sc.(ComputerScience)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

Write a java program to define a thread for printing text on output screen for ‘n’number
of times. Create 3 threads and run them. Pass the text ‘n’ parameters to the thread
constructor.
Example:
i. First thread prints“COVID19” 10times.
ii. Second thread prints “LOCKDOWN2020” 20times
iii. Third thread prints “VACCINATED2021” 30times [15 M]

2. Write a java program to read ‘n’ names of your friends, store it into
linkedlist, also display contents of the same.
[15M]

3. Viva [05M]

7
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a Java program to create a thread for moving a ball inside a panel vertically. The
ball should be created when the user clicks on the start button. [15M]

2. Write a program to sort HashMap by keys and display the details be for sorting and
after sorting. [15M]

3. Viva [05M]

8
Savitribai Phule Pune University
T.Y.B.Sc.(ComputerScience)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a program to create a new treeset, add some colors(string) and


print out the treeset.
[15M]
2.Write a java program for the following:

i. To create a Product(Pid, Pname, Price)table.


ii. Insert at least five records into the table.
iii. Display all the records from a table. [15 M]

3.Viva [05M]

9
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------
1. Write a program in which thread sleep for 6 sec in the loop in reverse order
from 100to1 and change the name of thread.
[15M]

2. Write a Java Program to create a PROJECT table with field’s project_id, Project_name,
Project_description, Project_Status. Insert values in the table. Display all the details of
the PROJECT table in a tabular format on the screen.(using swing). [15M]

3. Viva [05M]

10
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a Java program to display information about the database and list all the tables in
the database.(Use Database Meta Data). [15M]

2. Write a Java program to show lifecycle (creation, sleep, and dead) of a thread. Program
should print randomly the name of thread and value of sleep time. The name of the
thread should be hard coded through constructor. The sleep time of a thread will be a
random integer in the range 0 to 4999. [15M]

3. Viva. [05M]

11
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1.Write a program that implements a multi-thread application that has three threads.First
thread generates random integer every 1 second and if the value is even, second thread
computes the square of the number and prints. If the value is odd, the third thread will print
the value of cube of the number
[15M]

2. Accept ‘n’ integers from the user. Store and display Integers in sorted order
having proper collection class. The collection should not accept duplicate
elements. [15M]

1. Viva [05M]

12
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a java program to create a TreeSet, add some colors (String) and print out
thecontentofTreeSetinascendingorder. [15M]

2. Write a Java program to accept the details of Teacher (TNo,TName, Subject). Insert
atleast 5 Records into Teacher Table and display the details of Teacher who is
teaching“JAVA”Subject.(UsePreparedStatementInterface) [15M]

3. Viva [05M]

13
Savitribai Phule Pune University
T.Y.B.Sc.(ComputerScience)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a java program to accept ‘N’ integers from a user. Store and display integers in
sorted order having proper collection class. The collection should not accept duplicate
elements.
[15M]

2. Write a Multithreading program in java to display the number’s between 1 to 100


continuously in a Text Field by clicking on button.(Use Runnable Interface).
[15M]

3. Viva [05M]
14
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a java program to accept ‘N’ Integers from a user store them into LinkedList
Collection and display only negative integers. [15M]

2. Create a PROJECT table with fields project_id, Project_name,


Project_description,Project_Status. etc.Insert values in the table. Display all the details
of the PROJECT table in a tabular format on the screen. [15M]

3. Viva [05M]

15
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1.Write a program to display information about the database and list all the tables
in the database.(Use Database MetaData). [15M]

2.Write a program to sort HashMap by keys and display the details before
sorting and after sorting. [15 M]

3.Viva [05M]

16
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a java program to accept ‘N’ Subject Names from a user store the min
toLinkedList Collection and Display them by using Iterator interface. [15M]

2. Write a java program to solve producer consumer problem in which a producer


produces a value and consumer consume the value before producer generate the
nextvalue.(Hint:use thread synchronization) [15M]

3. Viva [05M]

17
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a Menu Driven program in Java for the following: Assume Employee table with
attributes (ENo, EName, Salary) is already created. 1. Insert 2. Update 3. Display
4.Exit. [15M]

2. Write a program in which thread sleep for 6 sec in the loop in reverse order
from 100 to1 and change the name of thread.
[15M]

3. Viva [05M]

18
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a java program to accept a String from a user and display each vowel from
aString after every 3 seconds. [15M]

2. Write a java program to accept ‘N’ student names through command line, store
themintothe appropriate Collection and display them by using Iterator and ListIterator
interface. [15M]

3. Viva [05M]

19
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1.Write a java program to scroll the text from left to right continuously. [15M]

2.Program to define a thread for printing text on output screen for ‘n’ number of
times. Create 3 threads and run them. Pass the text ‘n’ parameters to the thread
constructor. Example:
1. First thread prints “COVID19” 10times.
2. Second thread prints “LOCKDOWN2020” 20times
3. Third thread prints “VACCINATED2021” 30times [15M]

3.Viva [05M]
20
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a Java program to delete the details of given employee(ENo.,


ENameSalary).Accept employeeID through commandline.(Use PreparedStatement
Interface)
[15M]

2. Write a java program to accept names of ‘n’ cities, insert same into array
list collection and display the contents of same arraylist, also remove all
these elements.
[15M]

3. Viva [05M]

21
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Accept ‘n’ integers from the user. Store and display integers in sorted
order having proper collection class. The collection should not accept
duplicate elements.
[15M]

2. Write a program to display information about the database and list all the
tables in the database.(Use Database MetaData).
[15M]

3. Viva [05M]
22
Savitribai Phule Pune University
T.Y.B.Sc.(Computer Science)Sem-VI Practical Examination
CS-369: Practical Course based on CS 365
(Object Oriented Programming using Java–II)
Practical Duration:3Hours Max.Marks:35

-----------------------------------------------------------------------------------------------

1. Write a java program for the implementation of synchronization. [15 M]

2. Write a Java Program for the implementation of scrollable ResultSet. Assume Teacher
table with attributes (TID,TName,Salary) is already created. [15M]

3. Viva [05M]

23

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy