Question: EXERCISE: Keep your logbook up to date as you work through the exercises. Consider the following Class Diagrams, answer the given questions below. table

EXERCISE:
Keep your logbook up to date as you work through the exercises.
Consider the following Class Diagrams, answer the given questions below.
\table[[Author],[-name:String],[-yearBorn:int],[-passYear:int],[+Author(yBorn:int,n:String)],[+setPassYear(year:int)],[+getName():String],[+getAge():int //return the age, passYear -yearBorn]]
\table[[Book],[\table[[-name:String],[-author:Author],[-publishedYear:Date],[-publisher:String]]],[+Book (n:String, a:Author)],[+Book (n:String, a:Author, p:String)],[+setPublisher(p:String)],[+setPublishedYear(d:Date)],[+getName():String],[+getAuthorName():String],[+getPublishedYear():String],[+getPublisher():String]]
Create the class hierarchy in Java.
Create a test harness class (i.e. application class) named LibraryActivity.
Within LibraryActivity, create an author named "J.R.R. Tolkien" who was born in 1892 and died in 1973.
Within Library Activity, create a book named "Fellowship of the Ring" that was published in 1954 by "George Allen & Unwin" as the publisher.
Display the following in a JoptionPane.showMessageDialog: the name of the book, the author name, and the publication year by using the book object.
 EXERCISE: Keep your logbook up to date as you work through

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!