Conversation
rename variables split function
| */ | ||
| public class Customer { | ||
| private String customerName; | ||
| private Vector movieRentals = new Vector(); |
There was a problem hiding this comment.
Please use a List instead of a Vector
|
Consider using inheritance and polymorphism |
| /** | ||
| * @return total cost for all movies rented. | ||
| */ | ||
| public String totalCostRented() { |
There was a problem hiding this comment.
This method is still calculating the totalCost and it is printing.
Please split it.
| /** | ||
| * @return return the bonus for all movies rented. | ||
| */ | ||
| public String totalBonusFrequencyRented() { |
There was a problem hiding this comment.
This method is still calculating the totalFrequentRenterPoints and it is printing.
Please split it.
| public static final int REGULAR = 0; | ||
| public static final int NEW_RELEASE = 1; | ||
| private String titleMovie; | ||
| private int priceCodeMovie; |
There was a problem hiding this comment.
Now you need to remove the CHILDRENS, REGULAR, NEW_RELEASE constants and the priceCodeMovie attribute
and take advantage of inheritance. :)
| private String customerName; | ||
| private List<Rental> movieRentals; | ||
| private double totalAmount = 0; | ||
| private int frequentRenterPoints; |
There was a problem hiding this comment.
I think these attributes are no longer necessary because you have methods that are returned the totalAmount and totalFrequentRenterPoints.
| * @param title movie. | ||
| * @param priceCode movie. | ||
| */ | ||
| Movie(String title, int priceCode) { |
There was a problem hiding this comment.
Do we still need the priceCode?
| if (rental.getDaysRented() > 1) { | ||
| return 1; | ||
| } | ||
| return 0; |
There was a problem hiding this comment.
Please refactor this method in a single line.
|
@CynthiaTerrazas |
No description provided.