Question: IN JAVA PLEASE BOLD CODE PART A /** Monthly appointment. */ public class Monthly extends Appointment { /** Initializes appointment for a given date. @param

IN JAVA

PLEASE BOLD CODE

PART A

/**

Monthly appointment.

*/

public class Monthly extends Appointment

{

/**

Initializes appointment for a given date.

@param year the year

@param month the month

@param day the day

@param description the text description of the appointment

*/

public Monthly(int year, int month, int day, String description)

{

//-----------Start below here. To do: approximate lines of code = 1

// Initialize the inherited variables - make sure of the super() keyword

super(year, month, day, description);

//-----------------End here. Please do not remove this comment. Reminder: no changes outside the todo regions.

}

/**

Determines if the appointment occurs on the same day of the month.

@param year the year

@param month the month

@param day the day

@return true if day matches the appointment date and is later than the

appointment date stored in this object

*/

public boolean occursOn(int year, int month, int day)

{

//-----------Start below here. To do: approximate lines of code = 5

// Override the occursOn() method. Check to see if the appointment occurs on the

// same day of the month and is later than the appointment date stored in this object .

//-----------------End here. Please do not remove this comment. Reminder: no changes outside the todo regions.

}

}

PART B

/**

Daily appointment.

*/

public class Daily extends Appointment

{

/**

Initializes appointment for a given date.

@param year the year

@param month the month

@param day the day

@param description the text description of the appointment

*/

public Daily(int year, int month, int day, String description)

{

//-----------Start below here. To do: approximate lines of code = 1

// Initialize the inherited variables - make use of the super() keyword

super(year, month, day, description);

//-----------------End here. Please do not remove this comment. Reminder: no changes outside the todo regions.

}

/**

Determines if the date is later than the appointment date

@param year the year

@param month the month

@param day the day

@return true if base appointment is earlier than the appointment date

*/

public boolean occursOn(int year, int month, int day)

{

//-----------Start below here. To do: approximate lines of code = 9

// Override occursOn. Checks the given date parameters year, month, day to see if it is a later

// date than the appointment date stored in this object. Return true if so, false otherwise

//-----------------End here. Please do not remove this comment. Reminder: no changes outside the todo regions.

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!