2024-11-24 19:24:32 +01:00

25 lines
889 B
Java

package client;
import model.Article;
import model.Image;
import model.NewsCollection;
public class Client {
public static void main() {
NewsCollection masterCollection = new NewsCollection("Daily news");
masterCollection.addItem(new NewsCollection("Sports")
.addItem(new Article("Harder, Better, Faster, Stronger. Doping controls loosened","ups"))
.addItem(new Image("Athletic cat contest", 800, 600, "zdf")))
.addItem(new NewsCollection("Local news")
.addItem(new Article("Missing Cat missed.", "mfg"))
.addItem(new Article("Corrupted local politician selling cats.", "ard"))
.addItem(new Image("Missing cat", 1280, 720, "anonymous")));
System.out.println("\n===List===\n");
System.out.print(masterCollection.getOverview());
System.out.println("\n===Contents===\n");
System.out.print(masterCollection.getDetails());
}
}