Skip to content

West Midlands | 26-Java-June | Gabriel Deng | Sprint 4 | Rental Summary Generator - #77

Open
gai93003 wants to merge 1 commit into
CodeYourFuture:mainfrom
gai93003:sprint4-backlog
Open

gai93003 wants to merge 1 commit into
CodeYourFuture:mainfrom
gai93003:sprint4-backlog

Conversation

@gai93003

@gai93003 gai93003 commented Aug 23, 2026 •

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

@gai93003 gai93003 added 📅 Sprint 4 Assigned during Sprint 4 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 23, 2026
@lukedsouza99 lukedsouza99 self-assigned this Sep 4, 2026
@lukedsouza99
lukedsouza99 self-requested a review September 4, 2026 15:25
private final double carPrice;
private final ContractTerm term;

public Contract(String customerName, int customerAge, LocalDate startDate, int contractLengthYears, double carPrice) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could we add some way of letting other people know what this class is for? Same for other classes

}

public String getCustomerName() { return customerName; }
public int getCustomerAge() { return customerAge; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could we add some line breaks in between these to make it slightly easier to read (even though it's just some getters!) Same for other classes in this PR

THREE_YEAR(3, 36, 0.03);

private final int years;
private final int totalMonths;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do we need this field if we already have the number of years?

List<Rental> generateRentals(Contract contract);
}

abstract class AbstractRentalGenerator implements RentalCalculator {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could we break this out into its own separate class from the interface?

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

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress 📅 Sprint 4 Assigned during Sprint 4 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants