Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Name: P1) ) Given UML diagram, Answer the following questions. «entity» Inventor

ID: 3712125 • Letter: N

Question

Name: P1) ) Given UML diagram, Answer the following questions. «entity» Inventoryltem price +setPrice) (a) Explain the relation for Inventoryltem, DVD and Book. What advantages you will from this relation. «entity» Book «entity» DVD anufacturer author +setAuthor) +setManufacturer() «entity» Student «entity» Course Name sld um ame entity» Schedule (b) Can you write a Java code to represent the relationship between Student and Schedule? Your code may be abstract enough, so you may omit the body of methods

Explanation / Answer

Hi thanks for posting question.

a)here inventory item is a super class and book and DVD is the subclass of that.the advantage of that model is of is the all the inventory item is available for the Book and DVD.mean if we want to set the price and sell price for both book and DVD object, we can easily do that.also we can fetch the stored price and sell price for book and DVD object.

b)public class student{

public void student(String sName,String sID)

{

}

}

public class schedule extends students{ //extending students class

public void schedule(sName,sID){

super(sName,sID); //implementing super class

}

}

thanks..

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote