Professional Documents
Culture Documents
TIME: 3 HOURS
MARKS: 100
b. Develop a java program for implementing a queue data structure using linked list. Perform the following operations: i. ii. Insert an element Delete an element (50)
(40)
b. Develop a java program for implementing a stack data structure using linked list. Perform push and pop operations. (50)
b. Develop a java program for implementing a stack data structure using linked list. Perform push and pop operations. (50)
4. a. Develop a java program to perform binary search on a sorted array of N numbers. (40)
b. Develop a java program for implementing a singly linked list data structure. Perform the following operations: i. ii. Insert a node Delete a node (50)
(40)
b. Develop a java program for implementing a queue data structure using linked list. Perform the following operations: i. ii. Insert an element Delete an element (50)
6. a. Develop a java program to perform binary search on a sorted array of N numbers. (40)
b. Develop a java program for implementing a singly linked list data structure. Perform the following operations: i. ii. Insert a node Delete a node (50)
(40)
Define a class named COMPLEX for representing complex numbers that contains necessary data members and member functions. A complex number
has the general form a + ib, where a is the real part and b is the imaginary part (i stands for imaginary). Include methods for all the four basic arithmetic operators.
(50)
(40)
b. Develop a Java program to define a class called Account which contains two private data elements, an integer account number and a floating point account balance, and three methods: (50)
A constructor that allows the user to set initial values for account number and account balance and a default constructor that prompts for the input of the values for the above data members. A method which reads a character value for transaction type (D for deposit and W for withdrawal), and a floating point value for transaction amount, and updates account balance. A method, which prints on the screen the account number and account balance.
9. a. Develop a java program to perform the following: Define a class to represent a bank account. Include the following: Data members: Name of the depositor Account number Type of account Balance amount in the account Member functions: To assign initial values To deposit an amount To withdraw an amount after checking the balance To display account number, name and balance
(40)
(50)
(40)
Define a class named COMPLEX for representing complex numbers that contains necessary data members and member functions. A complex number
has the general form a + ib, where a is the real part and b is the imaginary part (i stands for imaginary). Include methods for all the four basic arithmetic operators.
b. Develop a java program using files to prepare a mark list for ten students. The input is Roll Number, Name, Mathematics Mark, Physics Mark and Chemistry Mark. Compute Total and Average. The report should be presented in the following format: (50)
Roll Number
Name
Mathematics Mark
Physics Mark
Chemistry Mark
Total
Average
(50)
(40)
12. a. Develop a java program using applets that can draw basic graphical primitives in different dimensions and colors. Use appropriate menus and buttons. (90)
(90)
14. a. Develop a java program using templates for implementing a linked list data structure and perform basic operations on the linked list. (40)
(50)
15. a. Develop a multi threaded program in java for the producer consumer application. (60)
(40)
16. a. Develop a Java program for generating two threads to perform the following operations: Generate first n prime numbers Generate first n Fibonacci numbers (45)
b. Develop a Java program that creates a string object and initializes it with your name and performs the following operations: (45)
Find the length of the string object using appropriate string method. Find whether the character a is present in the string. If yes find the number of times a appears in the name and the location where it appears.
17. a. Develop a Java program for generating three threads to perform the following operations: Accept N numbers Print the even numbers Print the odd numbers (45)
b. Develop a Java program to find the number of occurrences of a given word in a paragraph. (45)
18. a. Develop a java program that will create a data file containing the list of employees in the following table: Employee Number 123 124 Hamen Vippin Assistant Professor Professor Name Designation
(45)
b. Develop a java program to accept a paragraph, print each word in the paragraph with the number of vowels in each word. (45)
********