Design a console application that will print an estate agent property sale commission report. Use

an abstract class named EstateAgent that contains variables to store the estate agent's name and
property price. Create a constructor accepting the estate agent's name and property price as
parameters. In this class, also create get methods to get the estate agent name, property price
and estate agent commission. The agent commission is calculated at 20% of the property sale
price. The EstateAgent class must implement an iEstateAgent interface that contains the
following:

public interface iEstateAgent
{
String getAgentName();
double getPropertyPrice();
double getAgentCommission();
}

Create a subclass called EstateAgentSales that extends the EstateAgent class. The
EstateAgentSales class must contain a constructor to accept the estate agent name and the
property sale amount as parameters. Write code for the printPropertyReport method, which
prints the estate agent name, property sale price and the estate agent commission amount.

Finally, write a RunApplication class to instantiate the EstateAgentSales class. Sample output is
shown below, and you may use the same values to test your application.

Here is the code for the console application that prints an estate agent property sale commission report:

```java
// Abstract class EstateAgent
abstract class EstateAgent {
protected String agentName;
protected double propertyPrice;

public EstateAgent(String agentName, double propertyPrice) {
this.agentName = agentName;
this.propertyPrice = propertyPrice;
}

public String getAgentName() {
return agentName;
}

public double getPropertyPrice() {
return propertyPrice;
}

public double getAgentCommission() {
return propertyPrice * 0.2;
}
}

// Interface iEstateAgent
public interface iEstateAgent {
String getAgentName();
double getPropertyPrice();
double getAgentCommission();
}

// Subclass EstateAgentSales
class EstateAgentSales extends EstateAgent implements iEstateAgent {
public EstateAgentSales(String agentName, double propertyPrice) {
super(agentName, propertyPrice);
}

public void printPropertyReport() {
System.out.println("Estate Agent Name: " + getAgentName());
System.out.println("Property Sale Price: " + getPropertyPrice());
System.out.println("Estate Agent Commission: " + getAgentCommission());
}
}

// RunApplication class
public class RunApplication {
public static void main(String[] args) {
EstateAgentSales agentSales = new EstateAgentSales("John Smith", 250000.0);
agentSales.printPropertyReport();
}
}
```

Sample Output:
```
Estate Agent Name: John Smith
Property Sale Price: 250000.0
Estate Agent Commission: 50000.0
```

Sure! Here's the code for the console application that prints an estate agent property sale commission report:

```java
// Step 1: Create an abstract class EstateAgent
abstract class EstateAgent implements IEstateAgent {
protected String agentName;
protected double propertyPrice;

// Constructor
public EstateAgent(String agentName, double propertyPrice) {
this.agentName = agentName;
this.propertyPrice = propertyPrice;
}

public String getAgentName() {
return agentName;
}

public double getPropertyPrice() {
return propertyPrice;
}

// Implement the abstract method getAgentCommission
public double getAgentCommission() {
return propertyPrice * 0.2;
}
}

// Step 2: Create an interface IEstateAgent
public interface IEstateAgent {
String getAgentName();
double getPropertyPrice();
double getAgentCommission();
}

// Step 3: Create a subclass EstateAgentSales
class EstateAgentSales extends EstateAgent {
// Constructor
public EstateAgentSales(String agentName, double propertyPrice) {
super(agentName, propertyPrice);
}

// Implement the printPropertyReport method
public void printPropertyReport() {
System.out.println("Estate Agent Name: " + agentName);
System.out.println("Property Sale Price: $" + propertyPrice);
System.out.println("Agent Commission: $" + getAgentCommission());
}
}

// Step 4: Create a RunApplication class
public class RunApplication {
public static void main(String[] args) {
// Instantiate the EstateAgentSales class
EstateAgentSales agentSales = new EstateAgentSales("John Doe", 500000.00);

// Call the printPropertyReport method
agentSales.printPropertyReport();
}
}
```

When you run the above code, it will output:

```
Estate Agent Name: John Doe
Property Sale Price: $500000.0
Agent Commission: $100000.0
```

This is the estate agent property sale commission report, showing the agent's name, the property sale price, and the agent commission amount (which is calculated as 20% of the property sale price).

To design a console application that prints an estate agent property sale commission report, you will need to follow the instructions provided and create a class structure as described.

First, create an abstract class named EstateAgent with variables to store the estate agent's name and property price. The class should have a constructor that accepts the estate agent's name and property price as parameters. Additionally, create get methods to retrieve the estate agent name, property price, and estate agent commission.

```java
public abstract class EstateAgent {
private String agentName;
private double propertyPrice;

public EstateAgent(String agentName, double propertyPrice) {
this.agentName = agentName;
this.propertyPrice = propertyPrice;
}

public String getAgentName() {
return agentName;
}

public double getPropertyPrice() {
return propertyPrice;
}

public double getAgentCommission() {
return getPropertyPrice() * 0.2;
}
}
```

Next, create an interface named iEstateAgent with the required get methods.

```java
public interface iEstateAgent {
String getAgentName();
double getPropertyPrice();
double getAgentCommission();
}
```

Now, create a subclass called EstateAgentSales that extends the EstateAgent class. This class will have a constructor to accept the estate agent name and the property sale amount as parameters. Implement the printPropertyReport method to print the estate agent name, property sale price, and the estate agent commission amount.

```java
public class EstateAgentSales extends EstateAgent {
public EstateAgentSales(String agentName, double propertySaleAmount) {
super(agentName, propertySaleAmount);
}

public void printPropertyReport() {
System.out.println("Estate Agent Name: " + getAgentName());
System.out.println("Property Sale Price: $" + getPropertyPrice());
System.out.println("Estate Agent Commission: $" + getAgentCommission());
}
}
```

Finally, create a RunApplication class to instantiate the EstateAgentSales class. In the main method, create an instance of EstateAgentSales, provide the agent name and property sale amount as parameters, and call the printPropertyReport method.

```java
public class RunApplication {
public static void main(String[] args) {
EstateAgentSales estateAgentSales = new EstateAgentSales("John Doe", 100000);
estateAgentSales.printPropertyReport();
}
}
```

When you run the application, it should print the estate agent name, property sale price, and the estate agent commission amount:

```
Estate Agent Name: John Doe
Property Sale Price: $100000.0
Estate Agent Commission: $20000.0
```

You can customize the values in the RunApplication class to test different input scenarios.