design an estate agent sales class that must contain a constructor to accept the estate agent name and property sale amount as parameters and write a code for the print property report method which prints agent name; property sale price and the state agent commission amount

Sure, here is an example of how you can design the EstateAgentSales class in Java with the given requirements:

```java
public class EstateAgentSales {
private String agentName;
private double propertySaleAmount;

// Constructor to accept the estate agent name and property sale amount
public EstateAgentSales(String agentName, double propertySaleAmount) {
this.agentName = agentName;
this.propertySaleAmount = propertySaleAmount;
}

// Method to print the property report
public void printPropertyReport() {
double commission = calculateCommission();
System.out.println("Agent Name: " + agentName);
System.out.println("Property Sale Price: $" + propertySaleAmount);
System.out.println("Agent Commission: $" + commission);
}

// Method to calculate the agent commission (assume a commission rate of 5%)
private double calculateCommission() {
return propertySaleAmount * 0.05;
}
}
```

In this example, the EstateAgentSales class has a constructor that accepts the estate agent name and property sale amount as parameters. The printPropertyReport method prints the agent name, property sale price, and the agent commission amount. The calculateCommission method is used internally to calculate the commission based on a commission rate of 5%, which is then used in the printPropertyReport method to display the commission.

Here is an example implementation of an EstateAgentSales class based on your requirements:

```java
public class EstateAgentSales {
private String agentName;
private double saleAmount;
private double commissionAmount;

public EstateAgentSales(String agentName, double saleAmount) {
this.agentName = agentName;
this.saleAmount = saleAmount;
this.commissionAmount = calculateCommission();
}

public void printPropertyReport() {
System.out.println("Agent Name: " + agentName);
System.out.println("Property Sale Price: $" + saleAmount);
System.out.println("Agent Commission Amount: $" + commissionAmount);
}

private double calculateCommission() {
// Assuming the commission rate is 5% of the sale amount
double commissionRate = 0.05;
return saleAmount * commissionRate;
}

// Getters and Setters for agentName, saleAmount, and commissionAmount

public String getAgentName() {
return agentName;
}

public void setAgentName(String agentName) {
this.agentName = agentName;
}

public double getSaleAmount() {
return saleAmount;
}

public void setSaleAmount(double saleAmount) {
this.saleAmount = saleAmount;
this.commissionAmount = calculateCommission();
}

public double getCommissionAmount() {
return commissionAmount;
}

public void setCommissionAmount(double commissionAmount) {
this.commissionAmount = commissionAmount;
}
}
```

You can use this class as follows:

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

Output:
```
Agent Name: John Doe
Property Sale Price: $250000.0
Agent Commission Amount: $12500.0
```

In this example, the commission amount is calculated as 5% of the sale amount, but you can modify the `calculateCommission` method to use a different calculation based on your requirements.

To design the EstateAgentSales class, you will need to define the class with the required constructor and method. Here's an example code that demonstrates the implementation:

```java
public class EstateAgentSales {
private String agentName;
private double propertySaleAmount;
private double agentCommission;

// Constructor to accept agent name and property sale amount
public EstateAgentSales(String agentName, double propertySaleAmount) {
this.agentName = agentName;
this.propertySaleAmount = propertySaleAmount;
this.agentCommission = calculateCommission(propertySaleAmount);
}

// Method to calculate agent commission
private double calculateCommission(double propertySaleAmount) {
// The commission rate can be any percentage you define
double commissionRate = 0.05; // 5% commission rate
return propertySaleAmount * commissionRate;
}

// Method to print the property report
public void printPropertyReport() {
System.out.println("Agent Name: " + agentName);
System.out.println("Property Sale Price: $" + propertySaleAmount);
System.out.println("Agent Commission: $" + agentCommission);
}
}
```

In this code, the EstateAgentSales class has three instance variables: `agentName`, `propertySaleAmount`, and `agentCommission`. The constructor accepts the agent name and property sale amount as parameters and initializes these variables.

The `calculateCommission()` method calculates the agent commission based on the property sale amount. In this example, the commission rate is set to 5% (0.05), but you can modify it as per your requirement.

The `printPropertyReport()` method prints the agent name, property sale price, and agent commission by accessing the instance variables.

Here's an example of how you can use this class:

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

When you run the code, it will create an instance of the EstateAgentSales class with the agent name as "John Doe" and property sale amount as $100,000. It will then call the `printPropertyReport()` method to print the property report:

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

This demonstrates how to design the EstateAgentSales class with the constructor and printPropertyReport() method to handle the agent's name, property sale amount, and commission.