problem 1: prepare a program to find out the Factorial of a number by using Recursion. Factorial can be defined as Factorial
(n) = 1 * 2 * 3 ….* (n-1) * n.
problem 2: prepare a class vehicle. Define appropriate attributes and methods. prepare subclasses of Vehicle like Car, Bicycle and Scooter. Suppose appropriate required attributes. prepare constructor for each and define a method maxSpeed() in each class which prints the maximum speed of the vehicle. (Use of super keyword is expected in the constructor of inherited classes)
problem 3: Define an exception called “NoMatchException” that is thrown when a string is not equivalent to “Symbiosis”. prepare a Java program which uses this exception.
problem 4: prepare a program which describes the use of multithreading with the use of three counters with three threads defined for each. Three threads must represent the counters as shown:
a) One counter begins from 5 and increments with the step of 5.
b) Second counter begins from 10 and increments with the step of 10.
c) Third counter begins with 100 and increments with the step of 100.
Assign proper priority to the threads and then run the threads.
problem 5: prepare a program to make an applet with red back ground and display the Message WELCOME TO THE WORLD OF APPLETS. prepare its HTML document too. Specify width and height to the Applet.
problem 6: prepare a program which detects successive repeated occurrence of a letter in a word. For illustration, in the word “explanation” letter ‘a’ and ‘n’ occurs twice.
problem 7: prepare a Java program to make a JApplet with three Jbuttons Morning, Afternoon and Evening. When we click Morning button, the message “Good Morning to you” must appear. Similar for the other two buttons “Good Afternoon to you” and “Good evening to you” should appear. Each message should appear in a different Background, text, Color and Font.
problem 8: prepare a program to describe use of Grid Layout. On a frame with grid layout place buttons labeled correspondingly with the letters from ‘A to Z’. For illustration if you click the button labeled Z the message “You have clicked the Z “button must appear. (Set appropriate number of rows and columns).