-
Notifications
You must be signed in to change notification settings - Fork 1
/
Song.java
39 lines (33 loc) · 872 Bytes
/
Song.java
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
import java.util.*;
public class Song {
private String title;
private String artist;
private String genre;
// Add more attributes as needed
public Song(String title, String artist, String genre) {
this.title = title;
this.artist = artist;
this.genre = genre;
}
public String toString() {
return "Title: " + title + ", Artist: " + artist + ", Genre: " + genre;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getArtist() {
return artist;
}
public void setArtist(String artist) {
this.artist = artist;
}
public String getGenre() {
return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
}