Modifying scope of member variables

master
Hammy 4 years ago
parent 750fe62438
commit 954e901360

@ -2,9 +2,9 @@ package composite;
public class Song extends SongComponent { public class Song extends SongComponent {
String songName; private final String songName;
String bandName; private final String bandName;
int releaseYear; private final int releaseYear;
public Song(String songName, String bandName, int releaseYear){ public Song(String songName, String bandName, int releaseYear){
this.songName = songName; this.songName = songName;

@ -4,7 +4,7 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
public class SongIterator implements Iterator<SongComponent> { public class SongIterator implements Iterator<SongComponent> {
List<SongComponent> playList; private final List<SongComponent> playList;
private int currentIndex = 0; private int currentIndex = 0;
public SongIterator(List<SongComponent> playList) { public SongIterator(List<SongComponent> playList) {

Loading…
Cancel
Save