Solved

OOP's in Video Library Management

Posted on 2006-06-18
6
612 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi 2010 Export to pdf 2 382
static class 3 74
map interface methods 3 72
Permutation and Combination 9 99
Setting up SVN Server using Windows and Apache Purpose of the document:       This article will explain the process of how to configure SVN repository in a windows environment using APACHE web server. What is SVN? (http://subversion.tigris.org/) …
Pretext and Context: In this series, I wish to design the data model of systems in question. I will start by defining the scope and boundaries of the system, followed by subsystems involved, then finally the entities in those systems and subsystems…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 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