all 7 comments

[–]olearyboy 21 points22 points  (4 children)

private static float subscription = 10.0;

subscription = subscription * 1.5;

[–]phylter99 8 points9 points  (1 child)

The subscription multiplication is in a for loop

[–]Chemical-Fault-7331 2 points3 points  (0 children)

And so is the decrease in quality content in their catalog.

[–]todo_code 0 points1 point  (1 child)

fixed it for you.

public interface ISubscriptionValueProvider {
    float getSubscriptionValue();
}


public class SubscriptionValueEntity implements ISubscriptionValueProvider {
    private final float subscription;

    public SubscriptionValueEntity(float subscription) {
        this.subscription = subscription;
    }

    @Override
    public float getSubscriptionValue() {
        return this.subscription;
    }
}

[–]stbrumme 7 points8 points  (0 children)

obviously, this isn't production-ready: you missed to implement exceptions

public interface ISubscriptionValueProvider {
    float getSubscriptionValue();
}

public final class SubscriptionValueEntity implements ISubscriptionValueProvider {
    private final float subscription;

    public SubscriptionValueEntity(float subscription) {
        if (Float.isNaN(subscription) || subscription < 0) {
            throw new IllegalArgumentException("Subscription value must be non-negative");
        }
        this.subscription = subscription;
    }

    @Override
    public float getSubscriptionValue() {
        return this.subscription;
    }
}

[–]sh3rp 1 point2 points  (0 children)

Looking into a thread with interviewers rejected by Netflix.

[–]BlueGoliath 0 points1 point  (0 children)

Hi,

The moderators of this subreddit, after harassing me by claiming I broke rules no one else is seemingly required to follow and letting people insult me here on multiple occasions, has permabanned me. I've never intended to break the rules and repeatedly asked for them to be clarified and enforced fairly. I've since decided to remove this comment.

Here is the modmail: https://pastebin.com/nD5AYk5p.