Results 1 to 2 of 2
  1. #1
    guilty is offline Member
    Join Date
    Sep 2010
    Posts
    6
    Rep Power
    0

    Default Interfaces (not GUI)

    I'm not sure if I'm writing in the right forum, but here it goes.

    I need some advice on interface using. And no, I'm not talking about GUI's, i'm talking about "interface Foo { ... }". I'm doing an Odontology Clinic administration program for my uni assignment, and one of the tasks is to create an interface, and make one class implement it.

    Now, thing is, that i don't really know what the "good practice" of writing interfaces is. My lecturer doesn't pass just because the program works, it needs to both work and be logical, and he's quite strict in that thing.

    My OdontologyClinic class has ArrayLists of Workers, Clients, Visits and Tools that Odontologists (derived from Worker) use. Worker and Client are both Persons, and they basically only have salaries. Person has a name, surname, PersonalId number, etc.

    Operations are quite basic: export ArrayList, import ArrayList, add/remove element, set a field, etc.

    I know all of this is really abstract, but I have no idea of how to explain it more clearly. Code itself is quite long and consists of quite a few classes, so I doubt any of you guys will read it.

    This interface only has to have one or two methods.

    I've already said it, but I'll make it real clear. My question is: when an interface is needed in a program?

    I hope anyone will be interested in this topic :)

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

Similar Threads

  1. Interfaces
    By justin1980 in forum New To Java
    Replies: 9
    Last Post: 02-10-2010, 12:04 PM
  2. Interfaces
    By computerquip in forum New To Java
    Replies: 19
    Last Post: 09-08-2009, 04:58 PM
  3. Interfaces
    By jon80 in forum New To Java
    Replies: 2
    Last Post: 05-03-2008, 09:57 PM
  4. Interfaces
    By imran_khan in forum New To Java
    Replies: 5
    Last Post: 07-30-2007, 08:11 AM

Posting Permissions

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