TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Lars Persson
NA
110
0
OOP-question
Apr 9 2012 6:22 AM
I have an old project made i Java.
It is a library-system in which you can create book-objects and customer-objects.
You save the objects in a List.
Now when you are going to make a loan, here is how it worked in my old Java-project.
I had a class loan-handler. In that class I had a method where I sent a string ISBN (the book the customer would like to loan) a id string for the customer (the one to loan a book of course) a List of books and a List of customers.
In the method I would save the customer-object in a variable in the book-object so I know who have loaned the book.
The customer-object have a List in which you save the book that the customer would like to loan.
Hope I made it clear.
Is this good OOP-design? Is there a better way?
Should I have a loan-handler class?
Reply
Answers (
2
)
Gridview data into ms excel
How do I use a Background Worker with a class?