Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume you are given a class called Publisher that has two attributes publisherID and name of type String. There is another class called Book that

image text in transcribed

image text in transcribed

Assume you are given a class called Publisher that has two attributes publisherID and name of type String. There is another class called Book that has three attributes title of type String, authorName of type String and p of type Publisher, the constructor of class Book can be written as: public Book (String t, String an, Publisher pub) { title = t; authorName=an; p.publisherID = pub. publisherlD; p.name = pub.name; public Book(String PID, String n) {title = "Unknown", authorName = "Unknown"; publisherD=plD; name = n; public Book(String t. String an, String p1, String n) { title=t; authorName=an; p = new Publisher(p1, n): } public Book (String t, String an) {title=t; authorName=an; publisherID = "Unknown"; name = "Unassigned"; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago