Solved

OOP's in Video Library Management

Posted on 2006-06-18
6
609 Views
Last Modified: 2013-12-03
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.
0
Comment
Question by:Mamtha1982
  • 2
  • 2
  • 2
6 Comments
 
LVL 4

Accepted Solution

by:
fffej78 earned 450 total points
ID: 16933981
I think this sounds a little like homework to me :)  Which people aren't realy allowed to do for you.  Therefore you need to do the design and implementation yourself.  It's not hard.

Write down your problem, do "noun" analysis.  See http://www.objectmentor.com/publications/casestud.pdf [PDF link]  These nouns probably suggests classes / objects in the final system.

Identity relationships between the nouns.  For example, you have a rental which is either an issue / return, so this suggests to me that an issue is a rental, and a return is a rental, therefore I'd consider an inheritance relationship between the two.  A person has a number of rentals which sounds like another relationship to me.

Identity the salient data that needs to be recorded.  Group related data together.  Ensure data is not repeated.  See http://en.wikipedia.org/wiki/Database_normalization [Wikipedia].

Draw some UML, find out what a Use Case is, see http://en.wikipedia.org/wiki/Use_Case [Wikipedia].  Draw some class diagrams, see http://www.agilemodeling.com/artifacts/classDiagram.htm [Agile Modeling].

Once you have your diagrams, move to concretise them in VB.NET definitions.  If you want to respond with your thoughts, and sketch out some details, I'll help you fill them in, but I won't just give a complete solution from nothing.

0
 
LVL 12

Author Comment

by:Mamtha1982
ID: 16935864
Thanks. I will try to work on it. give me 1 day time please...
0
 
LVL 4

Assisted Solution

by:MikeGeig
MikeGeig earned 50 total points
ID: 16944945
You should concentrate on how the objects would be created just in code. Design your class(es) and then take any "members" of the class and make fields for the particular valus in your DB. The upon run tme, fill the classes using the data stored in the DB.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 12

Author Comment

by:Mamtha1982
ID: 16948848
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,Price,Qty,Discount etc.)
3. MemberMaster - All Members Details
4. CustomerMaster - Non Member Or Customer Details
5. Issues - Rental Issues (MemCode,CustCode,ItemCode,IssueDate,DueDate,ReturnDate,Status etc.)
6. PaymentDetails - All Cash/card payment details (MemCode,CustCode,Purpose,Paid,Cash,Card,PayDate etc.)
7. RentalItems - All Rental Items Details (ItemCode,Type,Title,Language,TotalQty,AvailQty,EntryDate etc.)
8. SalesItems - All Sales Items Details (ItemCode,Name,Desc,TotalQty,AvailQty,CostPrice,SalePrice,EntryDate 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.




0
 
LVL 4

Expert Comment

by:fffej78
ID: 16948946
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,Language,TotalQty,AvailQty,EntryDate etc.)
8. SalesItems - All Sales Items Details (ItemCode,Name,Desc,TotalQty,AvailQty,CostPrice,SalePrice,EntryDate etc.)

Let's extract out the commonality

9. Items - Item details( ItemCode,Name,Description,TotalQty,AvailQty,EntryDate)
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.
0
 
LVL 4

Expert Comment

by:MikeGeig
ID: 16950785
"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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Fluent Interface Design Pattern You can use the Fluent Interface (http://en.wikipedia.org/wiki/Fluent_interface) design pattern to make your PHP code easier to read and maintain.  "Fluent Interface" is an object-oriented design pattern that r…
Dependencies in Software Design In software development, the idea of dependencies (http://en.wikipedia.org/wiki/Coupling_%28computer_programming%29) is an issue of some importance. This article seeks to explain what dependencies are and where they …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now