-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMedia.java
More file actions
39 lines (39 loc) · 1.22 KB
/
Media.java
File metadata and controls
39 lines (39 loc) · 1.22 KB
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
34
35
36
37
38
39
abstract class Media implements java.io.Serializable,Comparable<Media>
{
private String title;
private String artist;
private int year;
private double size;
private int rating;
private String duration;
private String genre;
Media(String t,String a,String d,int y,int r,double s,String g)
{
this.title=t;
this.artist=a;
this.year=y;
this.size=s;
this.rating=r;
this.duration=d;
this.genre=g;
}
public String get_title() {return this.title;}
public String get_artist() {return this.artist;}
public String get_duration() {return this.duration;}
public String get_genre() {return this.genre;}
public double get_size() {return this.size;}
public int get_rating() {return this.rating;}
public int get_year() {return this.year;}
public void set_rating(int a){ this.rating=a;}
public String get_moviename(){ return null;}
public String get_director(){ return null;}
public String get_producer(){return null;}
public String get_certification(){return null;}
public boolean comp_mov_name(String st) {return false;}
public int compareTo(Media m)
{
return (m.get_rating()-this.rating);
}
abstract public int compare(String st);
abstract public boolean comparing(String st);
}