Praveen Kumar
asked on
OOP's in Video Library Management
I am doing a simple Video library management system basing vb.net and access. The transactions include Rentals (Issue/Return) , Sales, Purchases, Membership Regestartion etc.
My question is How i implement Object Oriented Programming approch in this system?
I dont need any links for documents on OOP's. I need a pactical implementation system design. Like Class Definations,Interface Definations, Database design will be appriciated.
My question is How i implement Object Oriented Programming approch in this system?
I dont need any links for documents on OOP's. I need a pactical implementation system design. Like Class Definations,Interface Definations, Database design will be appriciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes friends,
I designed following database.
1. InvoiceMaster - Stores Sales Invoice(InvNo,Cust Name,Address, Amount, Cash, Card etc.)
2. InvoiceDetails - Stores Sales Invoice Details(InvNo,ItemCode,Pri ce,Qty,Dis count etc.)
3. MemberMaster - All Members Details
4. CustomerMaster - Non Member Or Customer Details
5. Issues - Rental Issues (MemCode,CustCode,ItemCode ,IssueDate ,DueDate,R eturnDate, Status etc.)
6. PaymentDetails - All Cash/card payment details (MemCode,CustCode,Purpose, Paid,Cash, Card,PayDa te etc.)
7. RentalItems - All Rental Items Details (ItemCode,Type,Title,Langu age,TotalQ ty,AvailQt y,EntryDat e etc.)
8. SalesItems - All Sales Items Details (ItemCode,Name,Desc,TotalQ ty,AvailQt y,CostPric e,SalePric e,EntryDat e etc.)
I created a Class for every table, which will do all the required selections/manipulations in the respected Table.
Every Class have Proporties exactly as Columns in the Table.
While Inserting data, i am creating a object for that class storing values into the properties.Then one function will insert/update the database table.
Some shared members will return rows/values from the database.
Is this is the correct way to implement OOPS in the .net project?
hi fffej78, your links are useful but i cannot understand them completely at this time(as a student). Your Rental class idea also far away from my knowledge.
if you know any liks for example final Software documentation(OOPs) pls let me know.
I designed following database.
1. InvoiceMaster - Stores Sales Invoice(InvNo,Cust Name,Address, Amount, Cash, Card etc.)
2. InvoiceDetails - Stores Sales Invoice Details(InvNo,ItemCode,Pri
3. MemberMaster - All Members Details
4. CustomerMaster - Non Member Or Customer Details
5. Issues - Rental Issues (MemCode,CustCode,ItemCode
6. PaymentDetails - All Cash/card payment details (MemCode,CustCode,Purpose,
7. RentalItems - All Rental Items Details (ItemCode,Type,Title,Langu
8. SalesItems - All Sales Items Details (ItemCode,Name,Desc,TotalQ
I created a Class for every table, which will do all the required selections/manipulations in the respected Table.
Every Class have Proporties exactly as Columns in the Table.
While Inserting data, i am creating a object for that class storing values into the properties.Then one function will insert/update the database table.
Some shared members will return rows/values from the database.
Is this is the correct way to implement OOPS in the .net project?
hi fffej78, your links are useful but i cannot understand them completely at this time(as a student). Your Rental class idea also far away from my knowledge.
if you know any liks for example final Software documentation(OOPs) pls let me know.
Remember that duplication is bad. Look at RentalItems and SalesItems, they both have lots of repetition in them.
7. RentalItems - All Rental Items Details (ItemCode,Type,Title,Langu age,TotalQ ty,AvailQt y,EntryDat e etc.)
8. SalesItems - All Sales Items Details (ItemCode,Name,Desc,TotalQ ty,AvailQt y,CostPric e,SalePric e,EntryDat e etc.)
Let's extract out the commonality
9. Items - Item details( ItemCode,Name,Description, TotalQty,A vailQty,En tryDate)
7. RentalItem( ItemCode, Type, Title, Language )
8. SalesItems( ItemCode, CostPrice, SalesPrice )
SalesItems and RentalItems now both just contain an item code and the information specific to either rentals.
The works in exactly the same way as Issues and PaymentDetails. In these, you haven't put all of the Member information out, you've just put a reference to the MemberCode. This process is called normalisation.
Otherwise off to a good start :)
In your OO design, I'd certainly start off by considering a class per table.
7. RentalItems - All Rental Items Details (ItemCode,Type,Title,Langu
8. SalesItems - All Sales Items Details (ItemCode,Name,Desc,TotalQ
Let's extract out the commonality
9. Items - Item details( ItemCode,Name,Description,
7. RentalItem( ItemCode, Type, Title, Language )
8. SalesItems( ItemCode, CostPrice, SalesPrice )
SalesItems and RentalItems now both just contain an item code and the information specific to either rentals.
The works in exactly the same way as Issues and PaymentDetails. In these, you haven't put all of the Member information out, you've just put a reference to the MemberCode. This process is called normalisation.
Otherwise off to a good start :)
In your OO design, I'd certainly start off by considering a class per table.
"Is this is the correct way to implement OOPS in the .net project?"
Yes, though you should definitely consider what FFFEJ said and remove database redundancy.
Yes, though you should definitely consider what FFFEJ said and remove database redundancy.
ASKER