Need some work done? Post a Project Today
I need this simple java program created. It needs to have an interface as well. Please code in a way that I will be able to import it into NetBeans. If you have any questions, please ask.
A. Write a program that does the following:
1. Implements the runnable() interface
2. Implements the run() method of the runnable() interface to do the following:
a. Count down, starting with the number 5 and going to 0
b. Print the name of the thread and the current value of countdown integer for each integer counted down
c. Print “Blast Off!” when 0 is reached in the countdown
3. Creates five threads in your main class giving each thread a name: “Thread 1”, “Thread 2”, “Thread 3”, “Thread 4”, and “Thread 5”
4. Starts all five threads
Note: The Thread.currentThread().getName() method is helpful for retrieving thread names.
B. Please answer the following questions:
1. Explain how you used the Interface.
2. Explain how overriding through an Interface was used.
3. Talk about the differences between overriding and overloading.
a. Discuss where polymorphism was used in the application.
b. Identify where you used overriding or overloading in your application.
Additional Project Description:
02/08/2013 at 5:38 IST
Code must be documented thoroughly.