= Moved image class

This commit is contained in:
Matthew Cech
2019-03-30 14:26:03 -07:00
parent 66973e6532
commit a01c952d25
+39
View File
@@ -0,0 +1,39 @@
package core;
public class GenericImage
{
private String artist;
private String postURL;
private String imageURL;
public GenericImage(String artist, String postURL, String imageURL)
{
this.artist = artist;
this.postURL = postURL;
this.imageURL = imageURL;
}
public void editArtist(String artist)
{
this.artist = artist;
}
public void editPostURL(String postURL)
{
this.postURL = postURL;
}
public void editImageURL(String imageURL)
{
this.imageURL = imageURL;
}
public String toString()
{
if(imageURL.isEmpty())
{
return "I couldn't find anything! Please try again!";
}
return "Artist: " + artist + "\n<" + postURL.trim() + ">\n" + imageURL;
}
}