Solved

OOP's in Video Library Management

Posted on 2006-06-18
6
610 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Outlook Font 8 101
Display issues with nvidia 13 89
Configuration Repository for Multiuser Application (Best Approach). 5 51
constructor while deserilizing object 16 56
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 …
"Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

777 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