Solved

OOP's in Video Library Management

Posted on 2006-06-18
6
608 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 12

Author Comment

by:Mamtha1982
Comment Utility
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
Comment Utility
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
Comment Utility
"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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
Introduction This question got me thinking... (http://www.experts-exchange.com/questions/28707487/GLOBALS.html) Why shouldn't we use Globals? This is a simple question without a simple answer.  How do you explain these concepts to a programmer w…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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