Skip to content

Conversation

@yevgeniusr
Copy link

Attempt to realize all points

Copy link
Owner

@alexanderko alexanderko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хорошо 🔥


@Override
public boolean inCondition(Check check) {
return check.getCostByCategory(category) > 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract amount into field

}

@Override
public boolean inCondition(Check check) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chose better method name

@@ -1,5 +1,10 @@
package checkout;

import java.util.Date;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use LocalDate from java.time

this.category = category;
}

public Product(int price, String name, Category category, Trademark trademark) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constructor duplication


import java.util.Date;

public class SuperOffer extends Offer {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make Offer concrete class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants