-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpcomingMedia.java
More file actions
33 lines (28 loc) · 820 Bytes
/
UpcomingMedia.java
File metadata and controls
33 lines (28 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Importing localdate from time package
import java.time.LocalDate;
// Declaring a class called UpcomingMedia
public class UpcomingMedia extends Media
{
// Declaring a private variable to store the media's release date
private LocalDate dateOfRelease;
// Constructor to set the value of the instance variable
UpcomingMedia(LocalDate date)
{
this.dateOfRelease = date;
}
// Default constructor to set the value of the instance variable
UpcomingMedia()
{
this.dateOfRelease = null;
}
// Set method to set the value of the date instance variable
public void setDate(String dateInput)
{
this.dateOfRelease = LocalDate.parse(dateInput);
}
// Get method to return the value of the date instance variable
public LocalDate getDate()
{
return this.dateOfRelease;
}
}