<s>[INST] This is a problem from an exam paper.

A customer is interested in buying a car, and they are planning on negotiating the price. The company uses a complex pricing algorithm to determine the price of the car. However, the customer knows that the base price of the car, and how the algorithm affects the price. The base price of the car is $30,000. The algorithm will apply the following rules:

- If the customer is a first time buyer, then the price is reduced by 5%
- If the customer is buying on a weekend, then the price is reduced by 3%
- If the customer is a student, then the price is reduced by 10%

Here is a customer object, written in java:

```java
public class Customer {
    private boolean isFirstTimeBuyer;
    private boolean isBuyingOnWeekend;
    private boolean isStudent;

    public Customer(boolean isFirstTimeBuyer, boolean isBuyingOnWeekend, boolean isStudent) {
        this.isFirstTimeBuyer = isFirstTimeBuyer;
        this.isBuyingOnWeekend = isBuyingOnWeekend;
        this.isStudent = isStudent;
    }

    // getters and setters
}
```

Write a program that will take a `Customer`, and calculate the price of the car using the pricing algorithm.

Here is the method signature of what needs to be written:

```java
public double calculatePrice(Customer customer) {
    // your code here
}
```

**Constraints:**

- The base price of the car is $30,000.
- The discount cannot go below 0.
- All tests will be run with valid customer data.
- All methods will be called at least once.

**My Solution:**

```java
public double calculatePrice(Customer customer) {
    double basePrice = 30000;
    double discount = 0;

    if (customer.isFirstTimeBuyer()) {
        discount -= 0.05;
    }
    if (customer.isBuyingOnWeekend()) {
        discount -= 0.03;
    }
    if (customer.isStudent()) {
        discount -= 0.10;
    }

    return Math.max(basePrice + (basePrice * discount), 0);
}
```

However, I am being marked down for this solution, and I am not sure why, could you tell me why and suggest a better solution?[/INST]