interface Payable {
double getPayment();
}
class Invoice implements Payable {
String itemName;
int quantity;
double pricePerItem;
Invoice(String itemName, int quantity, double pricePerItem) {
[Link] = itemName;
[Link] = quantity;
[Link] = pricePerItem;
}
Invoice(String itemName, int quantity, double pricePerItem) {
[Link] = itemName;
[Link] = quantity;
[Link] = pricePerItem;
}
void display() {
[Link]("Invoice - Item: " + itemName + ", Quantity: " +
quantity + ", Price per Item: " + pricePerItem);
[Link]("Total Invoice Amount: Rs. " + getPayment());
}
}
class Staff implements Payable {
String name;
double salary;
Staff(String name, double salary) {
[Link] = name;
[Link] = salary;
}