Write the class Marketer to accompany the other law firm classes described in this chapter. Marketers make $50,000 ($10,000 more than general employees) and have an additional method called advertise that prints "Act now, while supplies last!" Make sure to interact with the superclass as appropriate.
// package classes;
public class Marketerer extends Employee {
// this method return the salary with 10000 more than general employee
public double getSalary() {
// get the super class salary and adds another 10000
double marketerSalary = super.getSalary() + 10000.0;
return marketerSalary;
}
// newly added advertise method
public void advertise() {
System.out.println("Act now, while supplies last!");
}
public static void main(String args[]) {
}
}
// package classes;
public class Employee {
public double getSalary() {
double salary = 40000;
return salary;
}
}