Bael-3966: code fixes after editor review (#9203)

This commit is contained in:
Aaron Juarez
2020-05-01 15:35:29 -04:00
committed by GitHub
parent 30bb6adc14
commit 2d44847335
5 changed files with 25 additions and 4 deletions

View File

@@ -1,23 +0,0 @@
package com.baeldung.objectclass;
import lombok.Data;
@Data
public class Borrower extends User {
private double totalLoanAmount;
public double requestLoan(double amount) {
totalLoanAmount = amount;
return totalLoanAmount;
}
public double increaseLoan(double increaseBy) {
return totalLoanAmount + increaseBy;
}
public double payLoan(double amount) {
return totalLoanAmount - amount;
}
}

View File

@@ -1,20 +0,0 @@
package com.baeldung.objectclass;
public class Lender extends User {
private double totalInvestmentAmount;
public double invest(double amount) {
totalInvestmentAmount = amount;
return totalInvestmentAmount;
}
public double increaseInvestment(double increaseBy) {
return totalInvestmentAmount + increaseBy;
}
public double collectDividends() {
return totalInvestmentAmount * 0.07;
}
}

View File

@@ -1,12 +0,0 @@
package com.baeldung.objectclass;
import lombok.Data;
@Data
public class User {
private String firstName;
private String lastName;
}