Sei sulla pagina 1di 7

INDEX

S. No. 1. (a) WAC that uses console output to print the statement, Welcome to Java Programming. (b) WAC that uses GUI dialog boxes to display the message, Welcome to Java Programming. 2. WAC to swap two numbers without using any temporary variable. Solve the above problem using: a. Command Line Input b. Console Input c. Input Dialog Box 3. WAC to print triangle multiplication table as given. 0 0 2 0 3 6 0 4 8 12 0 5 10 15 20 0 6 12 18 24 30 0 7 14 21 28 35 42 4. WAC to get the given pattern as output: ##### %%%%% ##### %%%%% ##### WAC to calculate the factorial of a number. 6. WAC to check for prime numbers in a given range. Also count the total number of prime numbers in a given range. 7. WAC to convert a decimal number to binary number or to convert a binary number to decimal equivalent using switch statement 8. WAC to print Fibonacci series on the output screen.
. . . . . .

Particulars

Page No.
.

Signature

5.

9. WAC to check whether a given number is Armstrong or not 10. WAC to check whether a given number is palindrome or not. 11. Write a java program to sort the elements of an array in an ascending order using (using switch statement) 1.1 bubble sort 1.2 selection sort 1.3 quick sort 1.4 insertion sort 12. Write an application to implement 2.1 Stack 2.2 Queue 13. WAC to create an external class with two instance variable x and y. Now create internal class with single variable z. Try to access x and y in inner class and z in outer class. 14. Write a simple for loop to add up the numbers from 1 to 100 and print out the result. Disassemble the program and see what you get. 15. Write a program to create a class hierarchy. Create a class BOXWEIGHT with data members weight which is inherited from the BOX class with data members width, height, depth. 5.1. Find its volume 5.2. Using the super keyword call the super class constructor. 16. Given the following skeletal code convert it to a full fledged code for implementing a small banking application: 17. Give example usage and expected output for the following methods of Arrays class: a. toString b. copyOf c. sort d. BinarySearch e. Fill f. Equals

18. Demonstrate the usage of two dimensional arrays using any example. 19. Use ragged array to provide the output given below 1 123 12345 1234567 123456789 20. Create a class called Numeral that accepts an array of ten numbers. Create a subclass called Numplay which has a menu as follows: 10.1. display numbers entered 10.2. sum of the numbers 10.3. average of the numbers 10.4. maximum of the numbers 10.5. minimum of the numbers 21. Write a java program to display 5X5 identity matrix? 22. Create a class named Book that contains the data fields for title and number of pages. Include get and set methods for these fields. Create a subclass named Textbook that contains an additional field that holds the Publisher Name for the textbook and additional methods to get and set the publisher name. Write a class called DemoBook that demonstrates objects of each class. 23. WAC to 3.1. Test equality between two strings. 3.2. Find the length of the strings 3.3 Replace the Is in the string with zs 3.4 Convert one of the string to upper case. 3.5 Concatenate the appendage will come after me to one of the strings. 24. WAC that has overloaded methods. The first method should accept no arguments, the second method will accept one string and the third method will accept a string and an integer. The first method should display the message Rose

is a beautiful flower twice. The second method should display the message Sunflower is a beautiful flower twice. The third method should display the message Marigold is a beautiful flower four times. 25. Create a base class called shape. It should contain two methods getcoord () and showcoord () to accept x and y coordinates and to display the same respectively. Create a subclass called Rect. It should also contain a method to display the length and breadth of the rectangle called showcoord (). In the main method, execute the showcoord () method of the rect class applying the dynamic method dispatch concept. 26. Create an Abstract class Animal to provide generic data field animal name. Also provide methods that accept and return the name of the animal. Create classes to represent different animals like Dog, Cow, Snake that code the sound of the animal using the Speak() method and inherit the generic class Animals. Create a class called Use Animals that demonstrates the use of the various animal classes. 27. Create a package called main to contain classes main1, subclass and same package. The main1 class should contain declarations of variable with different access specifierwithout access specifier, private, public and protected. Inside the constructor, print all the variables. The subclass is derived from the main1 class. The subclass and samepackage class should contain a constructor that tries to access the same variables given above. Check if this is possible. 28. Create an interface PizzaConstants that contains static and final variables to store the values SMALL_DIAMETER, LARGE_DIAMETER, TAX_RATE and COMPANYNAME.Create a class PizzaDemo that holds a data member specialPrice that displays an offer of SMALL_DIAMETER and LARGE_DIAMETER pizza with number of toppings at the specialPrice+specialPrice*TAX_RATE 29. Write a program which will handle 2 exceptions ArrayIndexOutofBound and arithmetic exception.
. . . . .

30. WAC that will deliberately throw null pointer exception in the code and try to handle this exception in the main function. 31. Create your own exception class which will be fired if inserted string is less than 3 Characters. 32. Write a program to create multiple threads that will print table of 2, 3 and 4 simultaneously. 33. Create two threads. One of the threads has to print even numbers and another should print odd numbers. 34. Write a connection-oriented client server application that displays whatever is typed on the client on the server using sockets? 35. Write a connection-less client server application that displays whatever is typed on the server on the client using datagrams? 36. Write a program to read your name from the console? 37. Write a program to gather information about a file? 38. WAC ReadAndWriteToAFile to write some characters in a file and output the same? 39. Write a program to display Key Events 40. Write a program to display Mouse Coordinates

41. Write a program to create traffic light applet? 42. Write a program to create a menu frame? 43. Write a program to create a moving banner? 44. WAP using applet To draw a Hut. 45. WAP using applet to roll a ball from one corner to another of applet window 46. Create a login window to check user name and password using text fields and command buttons 47. Create two choice menus. One selects the operating system. The other selects the browser 48. Write a program to create a simple calculator. 49. Write a program to find duplicates in a string using Set? 50. Write a program that demonstrates the use of a map with key type String and value type Employee . 51. Demonstrate the use of Map through the following program: use it to count the number of occurrences of a word in a String. The output should arrange the strings in alphabetical order display the count of occurrences along with the string. E.g. for the input test string to test my program the result should be: my: 1 program: 1 string: 1

test : 2 to: 1
.

52. Concept Covered JDBC Callable Statement. Write any procedure/function with IN/OUT parameter in Oracle. Execute the same procedure/function using CallableStatement in JDBC. 53. .WAP to perform database connectivity using ODBC(Create a connection to MS Access, create a table, insert values in the table and fetch the data from the table all through the Java application) Create a Student table using JDBC API. Design a menu based application to add/update/delete data in student table For implementation of update/delete feature the application must display the list of all students so that user can select the student to update/ delete the details of selected student. 54. Write a simple bean that makes a button library using net beans IDE? 55. Write an application that implements a checkerboard in a Frame window using JButton? 56. Reads a string from the end-user. And invoke method remotely to count the characters in the string using RMI . Display the returned count. Use concept of RMI for the implementation

Potrebbero piacerti anche