Create uml class diagram for computer science book
Java Assignment
Answer the following Questions:
CSBooks |
|
+ setBookTitle (String) : void + getBookAuthor() : String + getNumberofBook() : int |
private String bookTitle;
private String bookAuthor;
public String getBookTitle()
{}
public void setBookAuthor(String bookAuthor)
{}
public double getNumberSold()
{}
a) What would be an appropriate name for the superclass? (1 mark)
Answer: The appropriate name for superclass is Library
arrayAudioBooks : String
4a. Let’s assume that you have a numberSold field and a getNumberSold method in the superclass.
For magazines, numberSold refers to the number of yearly subscriptions sold. However, magazines can be published quarterly (4 issues a year), bi-monthly (6 issues a year), etc. The Magazine class will include a field called issues. Write the method (in the Magazine class) that when
magazine1.getNumberSold()