Question: In Java: Write a program (your main method should be in class Main4) that (i) takes a class name as a command line argument; (ii)
In Java:
Write a program (your main method should be in class Main4) that (i) takes a class name as a command line argument; (ii) in that class locates all public static methods
1. that take no parameters,
2. return a bool, and
3. whose name starts with "test"
and (iii) invokes those methods.
If such a method returns true, your program should output
OK: testX succeeded
where testX is the name of the tried test method.
In the case of false the output should be
FAILED: testX failed
Write a class MyClass that has some test methods, and try your program with that class. Ensure that your submission includes this class too.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
