|
|
|
|
|
|
|
|
Contents
|
Prg
|
Program Statement
|
Download
|
1
|
Write a Java program that prints all real solutions to the quadratic equation
ax2 + bx + c = 0. Read in a, b, c and use the quadratic formula. If the discriminant (b2– 4ac) is negative; display a message stating that there are no real solutions.
|
|
2
|
The Fibonacci sequence is defined by the following rule: The first two values in the sequence are 0 and 1. Every subsequent value is the sum of the two values preceding it. Write a Java program that uses both recursive and non-recursive functions to print the nth value in the Fibonacci sequence.
|
CLICK HERE
|
3
|
Write a Java program that prompts the user for an integer and then prints out all prime numbers up to that integer.
|
|
4
|
Write a Java program that checks whether a given string is a palindrome or not. For example, “MADAM” is a palindrome.
|
|
5
|
Write a Java program for sorting a given list of names in ascending order.
|
|
6
|
Write a Java program to multiply two given matrices.
|
|
7
|
Write a Java Program that reads a line of integers, and then displays each integer, and the sum of all the integers (use StringTokenizer class).
|
|
8
|
Write a Java program that reads a file name from the user then displays information about whether the file exists, whether the file is readable, whether the file is writable, the type of file and the length of the file in bytes.
|
|
9
|
Write a Java program that reads a file and displays the contents of the file on the screen, with a line number before each line.
|
|
10
|
Write a Java program that displays the number of characters, lines and words in a text file.
|
|
11
|
Write a Java program for creating multiple threads.
(a) Using Thread class
(b) Using Runnable interface
|
|
12
|
Write a Java program that illustrates how run time polymorphism is achieved.
|
|
|
|
|
13
|
Write a java program that illustrates the following:
(a) Creation of simple package.
(b) Accessing a package.
(c) Implementing interfaces.
|
|
14
|
Write a java program that illustrates the following
(a) Handling predefined exceptions
(b) Handling user defined exceptions
|
|
15
|
Write Java programs that use both recursive and non-recursive functions for
implementing the following searching methods:
(a) Linear search
(b) Binary search
|
|
16
|
Write Java programs to implement the List ADT using arrays and linked lists.
|
|
17
|
Write Java programs to implement the following using an array.
(a) Stack ADT
(b) Queue ADT
|
|
18
|
Write a java program that reads an infix expression, converts the expression
to postfix form and then evaluates the postfix expression (use stack ADT).
|
|
19
|
Write a java program that determines whether parenthetic symbols ( ), { } and
[ ] are nested correctly in a string of characters(use stack ADT).
|
|
20
|
Write a java program that uses both stack and queue to test whether the given string is a palindrome.
|
|
21
|
Write Java programs to implement the following using a singly linked list.
(a) Stack ADT
(b) Queue ADT
|
|
22
|
Write Java programs to implement the deque (double ended queue) ADT using
(a) Array
(b) Doubly linked list.
|
|
23
|
Write a Java program to implement priority queue ADT.
|
|
24
|
Write Java programs that use recursive and non-recursive functions to traverse the given binary tree in
(a) Preorder
(b) Inorder and
(c) Postorder.
|
|
25
|
Write a Java program that displays node values in a level order traversal
(Traverse the tree one level at a time, starting at the root node) for a binary tree.
|
|
26
|
Write a Java program that uses recursive functions.
(a) To create a binary search tree.
(b) To count the number of leaf nodes.
(c) To copy the above binary search tree.
|
|
27
|
Write a Java program to perform the following operations:
(a) Insert an element into a binary search tree.
(b) Delete an element from a binary search tree.
(c) Search for a key element in a binary search tree.
|
|
28
|
Write a Java program to perform the following operations
(a) Insertion into an AVL-tree
(b) Deletion from an AVL-tree
|
|
29
|
Write a Java program to perform the following operations:
(a) Insertion into a B-tree
(b) Deletion from a B-tree
|
|
30
|
Write a Java program to implement all the functions of a dictionary (ADT) using Hashing.
|
|
31
|
Write Java programs for the implementation of bfs and dfs for a given graph.
|
|
32
|
Write Java programs for implementing the following sorting methods:
(a) Bubble sort
(b) Selection sort
(c) Insertion sort
(d) Quick sort
(e) Merge sort
(f) Heap sort
(g) Radix sort
(h) Binary tree sort
|
|
33
|
Write a Java program for implementing KMP pattern matching algorithm.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|