Results 1 to 2 of 2

Thread: Modelling objects question

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2000
    Location
    Horst
    Posts
    262

    Modelling objects question

    Hi group,

    I'm rebuilding a "Knowledgebase" (KB) i've created in Access to C#. This time i want to do it correct. OO and everything. Since I have no OO exp I'm asking you for help.

    Functionality:
    KB is able to:
    - Store Notes, Examples, tips, URL's, attachments
    - Add/ Delete/ update Notes, Examples, tips, URL's, attachments
    - Print Notes, Examples, tips, URL's, attachments
    - Search Notes, Examples, tips, URL's, attachments

    Classes I think are necessary:
    - Connect (to connect to the SQL database)
    - Method: Open
    - Method: Close
    - Method: State
    - Example
    - Method: Select
    - Method: Add
    - Method: Delete
    - Method: Update
    - Note
    - Method: Select
    - Method: Add
    - Method: Delete
    - Method: Update
    etc for Tips, URL's, Attachments.
    - Print (parameter:item (notes, examples) to search)
    - Search (parameter:item (notes, examples) to search)

    I've noticed that this way I'm going to create a lot of duplicate code. Can anybody give me some tips on how to setup these classes the OO way?

    SD.
    PS: I've already started reading about OO....

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    First off , this issue requires reading on OOP but as a tip :
    Put all shared methods in the base class and derive from it to children classes .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width