• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

# of classes and interfaces

 
Jared Chapman
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider this requirement in the specs:
Code complexity, including nesting depth, argument passing, and the number of classes and interfaces, should be reasonable.


Exactly what is reasonable as far as # of classes is concerned? I have the following Exceptions declared so far:
  • RecordNotFoundException
  • DuplicateKeyException
  • SecurityException
  • LockException (runtime - if the lock-modify-unlock conrract is violated)
  • OutdatedRecordException - thrown when a record from the GUI is updated, but that record has changed since the last time the GUI was refreshed
  • DataIOException - runtime - wraps IOException
  • ControllerException - client side exception

  • Should this be considered unreasonable? Anyone else out there using a lot of exceptions?
     
    Inuka Vincit
    Ranch Hand
    Posts: 175
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I have 2 more exceptions that are defined other than the 2defined within my assignment. But then again if you feel that those exceptions are neccary for the design keep them. I think they dont want you to break down the classes unneccaraly, kind of like creating a model for every single component in the GUI. I have 17 classes in mine and I feel that I need every single one of them .
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic