OSSpk / Library-Management-System-JAVA

📚 A sophisticated Library Management System designed in Java while following the concepts of decoupled layers (entities) and minimal code in interface (GUI).
https://github.com/harismuneer
MIT License
327 stars 223 forks source link

Uso de Patrones de diseño #20

Open steevenGD opened 9 months ago

steevenGD commented 9 months ago

Buenos días/tardes/noches Se ha encontrado una posible aplicación para el manejo de las familias de objeto relacionados a la clase Person, haciendo uso del patron de diseño Abstract Facthory se puede mejorar la instanciación de los objetos relacionados a la clase Person(Familias de objetos) , tales como Borrower o Staff con el uso de interfaces, espero les ayudo al mejoramiento de su proyecto. Adjunto diagrama UML image

Mayuri1825 commented 7 months ago

I created an interface name PersonFactory and in that two methods were decalred createborrower() and createStaff(). createBorrower creates and returns instance of Borrower. createStaff creates and returns instance of staffClass. Also implemented interface in bowwer.java and staff.java classes.

createBorrower () in borrower class prompts user for borrower information(ID,Name,Address,Phone No) and then created a new instance of borrower

createStaff() in staff prompts user for staff information (ID, Name, Address, Phone number, Salary) and creates new instance of staff with these values.