Question: question 5 Course code : Object Oriented Programming I need this question answer with in 1 hour. Question 5 [4 +4] Write codes to perform
question 5
Course code : Object Oriented Programming
I need this question answer with in 1 hour.

Question 5 [4 +4] Write codes to perform the following two tasks: A. Create a thread class named "NegativeFilter" extending the "Thread" class. Inside the run method it should continuously take an integer as input from console and output to console if it's non-negative. Write the public Main class and inside the main method, create an object of "Negative Filter" and start the thread. B. Create a thread class named "EvenFilter" implementing the "Runnable" interface. Inside the run method it should continuously take an integer as input from console and output to console if it's an odd number. Write the public Main class and inside the main method, create a thread object that takes an "EvenFilter" object and start the thread
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
