Question: Given the files below... ATAT.java ATST.java DeathStar.java ImperialShuttle.java StarDestroyer.java TIEBomber.java TIEFighter.java *For each of these classes listed above, there is a Tester class that contains
Given the files below...
ATAT.java
ATST.java
DeathStar.java
ImperialShuttle.java
StarDestroyer.java
TIEBomber.java
TIEFighter.java
*For each of these classes listed above, there is a Tester class that contains all unit tests for the corrsponding vehicle named as `(Vehicle)Tester.java`, where (Vehicle) can be replaced by any of the vehicle class name. Write a Makefile that does the following:
1. When type in `make (Vehicle).class`, the corresponding vehicle class is built, if and only if its Java source file has been updated since the last time it was built.
2. When type in `make` or `make vehicles`, each vehicle class will be built (ATAT.class, ATST.class, etc.) if and only if the corresponding Java source file has been updated since the last time that class was built.
3. When type in `make (Vehicle)Tester.class`, the corresponding tester class is built, if and only if (Vehicle).java or (Vehicle)Tester.java has been updated since the last time the tester was built.
4. When type in `make tests`, all tester classes will be built (ATATTester.class, ATSTTester.class, etc.), if and only if the corresponding Java source file for that tester or the tested vehicle
has been updated since the last time the tester was built.
5. When type in `make clean`, all class files will be removed.
*Hints: You are encouraged to use variables to organize your code and increase readability. And feel free to create dummy classes for testing purposes*
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
