Q1. prepare down a superclass Worker and subclasses HourlyWorker and SalariedWorker. Every worker consists of a name and a salary rate. prepare down a method computePay(int hrs) which computes the weekly pay for every worker. The hourly worker gets paid the hourly wage for the actual number of hrs worked, if hours are at most 40. If the hourly worker worked greater than 40 hrs, the excess is paid at time and a half. The salaried worker gets paid the hourly wage for 40 hrs, no matter what the actual number of hrs is. prepare down a static method which uses polymorphism to find out the pay of any worker. Supply a test program which tests these classes and methods.
Q2. How inter thread communication is completed in Java? prepare down a java program to make multithreads with various priorities.
Q3. Illustrate the significance of exception handling method in Java? Define and differentiate checked and unchecked exceptions.
Q4. What do you mean by constructor overloading in java? Describe with an illustration. List all the special properties of the constructors.
Q5. prepare brief notes on the given (Any four) giving appropriate illustrations:
a) Java API packages.
b) AWT controls.
c) Adapter classes.
e) Event Listener Interfaces.