Question: MAKE A UML CLASS DIAGRAMS FOR THE FOLLOWING JAVA CODE!!! and describe the 3 functions the system will implement. This description should include any arguments,

MAKE A UML CLASS DIAGRAMS FOR THE FOLLOWING JAVA CODE!!! and describe the 3 functions the system will implement. This description should include any arguments, returns, or fields needed in order to make this functionality work:

PRODUCT:

MAKE A UML CLASS DIAGRAMS FOR THE FOLLOWING JAVA CODE!!! and describe

BOOK:

the 3 functions the system will implement. This description should include any

CD:

arguments, returns, or fields needed in order to make this functionality work:

DVD:

PRODUCT: BOOK: CD: DVD: MEMBER: PREMIUM MEMBER: STORE: public class Product \{

MEMBER:

private int count; private int productID; public Product(int pID, int noofProduct) \{

public void setcount (int count) \{ public int getProductID () \{ this.productID=pID;

PREMIUM MEMBER:

this. count = noofProduct; return productID; p public int getcount () \{

peturn count; this.productid = productid; public class Book extends Product \{ private

STORE:

String ISBN; public Book (int pID, String bISBN, int noofProduct) { )

super (pID, noofProduct); this.ISBN = bISBN; public String getISBN () \{ return

ISBN; f public void setISBN (String iSBN) \{ ISBN = iSBN; public

class CD extends Product public CD (int pID, int noofProduct) super (pID,

noofProduct) ; f \} public class DVD extends Product public DVD (int

public class Product \{ private int count; private int productID; public Product(int pID, int noofProduct) \{ public void setcount (int count) \{ public int getProductID () \{ this.productID=pID; this. count = noofProduct; return productID; p public int getcount () \{ peturn count; this.productid = productid; public class Book extends Product \{ private String ISBN; public Book (int pID, String bISBN, int noofProduct) { ) super (pID, noofProduct); this.ISBN = bISBN; public String getISBN () \{ return ISBN; f public void setISBN (String iSBN) \{ ISBN = iSBN; public class CD extends Product public CD (int pID, int noofProduct) super (pID, noofProduct) ; f \} public class DVD extends Product public DVD (int pID, int noofProduct) \{ super (pID, noofProduct); // TODO Auto-generated constructor stub ? return lastName; \} public void setLastName (String lastName) \{ this. lastName = lastName; 3 public double getMoneySpent() \{ return moneyspent; \} public void setMoneySpent (double moneySpent) f this.moneySpent = moneySpent; 3 } this.feePaidonTime = feePaidonTime; \} b System. out.println( : "Plese enter book isbn number"); bISBN =SC next (); book = new Book (pID, bISBN, noofProduct); Inventory.add ( : book); belse if (isBook. equalsIgnoreCase ( anotherstring: "M" ) ) cd = new CD (pID, noofProduct); inventory.add ( : cd); f dvd = new DVD (pID, noofProduct); inventory.add ( : dvd); System. out.println( ": "Press Y if you want to add another item in inventory"); char ch =Scnext() charAt ( inder: 0); if (ch I=Y ' II ch I=Y) break; b 3 private static void DistributeItem() f // TODO Auto-generated method stub System. out.println( : "Enter product id to issue"): int pID =sc nextInt () ; int pCount: String premium = null, paymentMethod = null; double fee =0; PremiumMember member; if (findProduct (pID)) f System. out.println( w: "Enter number of item you want"); pCount =SC nextInt () ; if (CheckInventory(pID, pCount)) \{ System. out.println( ;: "Plese enter Member ID"); int id =ScnextInt() : System. out.println( i: "Plese enter Member first Name"): String fName = sc.next (); System. out.println( ;: "Plese enter Member last Name"); String lName = sc.next (): System. out.println( ar: "Press Y\Y if you member is Premium"); member = new PremiumMember (id, fName, 1Name ); if (premium. equalsIgnoreCase( anotherstring: "Y")) \{ System. out.println( m: "Enter monthly fee and payment method"); member.setFeeMonthly (feeMonthiy: fee); member.setPaymentMethod (paymentMethod); \} members.add ( e: member); 1 belse \{ System. out.println( : "Item not found"); \} f private static boolean CheckInventory(int pID, int pCount) \{ String check; System. out.println(a: "Do you want to distribute more items press Y"); check = sc.next () ; if (! check. equalsIgnoreCase (anotherstring : "Y") ) f break; 3 \} \} b

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!