Question: Question The following class Loan has incomplete codes. Complete the missing lines of codes for the given parameterized constructor, isToMonitor method, and toString() method. Hint:
Question The following class Loan has incomplete codes. Complete the missing lines of codes for the given parameterized constructor, isToMonitor method, and toString() method. Hint: If the loan amount exceeds $500000.00 then it needs to be monitored. The method isToMonitor has to return true or false accordingly.
import java.time.*;
public class Loan
{
private double loanAmount;
private LocalDate startDate;
private static double LIMIT = 500000.0;
/** * @param givenLoanAmount the loan amount *
@param year the year of startDate *
@param month the month of startDate *
@param day the day of startDate */
public Loan ( double givenLoanAmount, int year, int month, int day)
{ //Missing lines of code have to be completed }
public boolean isToMonitor()
{ //Missing lines of code have to be completed }
@Override public String toString()
{ //Missing lines of code have to be completed }
}//end class definition
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
