//eg17_TextBook class, to show "aggregation" //instance of "eg17_TextBook" class is to be a field in "eg17_Course" class public class eg17_TextBook { private String title; private String author; private String publisher; //constructor public eg17_TextBook(String textTitle, String auth, String pub) { title = textTitle; author = auth; publisher = pub; } public eg17_TextBook(eg17_TextBook object2) { title = object2.title; author = object2.author; publisher = object2.publisher; } public String toString() { String str = "Title: " + title + "\nAuthor: " + author + "\nPublisher: " + publisher; return str; } }