In: Computer Science
Write a Java application that implements the following:
Create an abstract class called GameTester. The GameTester class includes a name for the game tester and a boolean value representing the status (full-time, part-time).
Include an abstract method to determine the salary, with full-time game testers getting a base salary of $3000 and part-time game testers getting $20 per hour. Create two subclasses called FullTimeGameTester, PartTimeGameTester.
Create a console application that demonstrates how to create objects of both subclasses. Allow the user to choose game tester type and enter the number of hours for the part-time testers.
PLEASE GIVE IT A THUMBS UP, I SERIOUSLY NEED ONE, IF YOU
NEED ANY MODIFICATION THEN LET ME KNOW, I WILL DO IT FOR
YOU
abstract class GameTester {
private String name;
private boolean status;
public GameTester(String n, boolean s) {
name = n;
status = s;
}
public abstract double determine_fee(int hours);
}
class PartTime extends GameTester {
public PartTime(String n) {
super(n, false);
}
public double determine_fee(int hours) {
return hours * 20.0;
}
}
class FullTime extends GameTester {
public FullTime(String n) {
super(n, true);
}
public double determine_fee(int hours) {
return 3000.0;
}
}
//Use Game_Tester.java.
class Game_Tester {
public static void main(String[] args) {
FullTime FT = new FullTime("Pavan");
PartTime PT = new PartTime("Pavan");
System.out.println(
"Fee to be paid by FullTime student is " + FT.determine_fee(4)
);
System.out.println(
"Fee to be paid by PartTime student is " + PT.determine_fee(4)
);
}
}