• 0

What is Class Design (Java)


Question

2 answers to this question

Recommended Posts

  • 0

("Class design" can be a bit of vague topic, so the following is the way I see it, but not necessarily the way your professor may see it)

Designing a class is the process of describing a class in an simple form, without going into any code. Think of it a bit like pseudocode for an object. Primarily, class design focuses on the public (and protected) properties of the class (public methods, constructors, public members, etc), without including the private stuff that actually makes it work.

High-level class design allows you to get a grasp of how objects may interact with each other before you write any code. The following is a basic UML class diagram showing the class design of three classes...

500px-KP-UML-Generalization-20060325.svg

In the example above, the three classes are Person, Student and Professor. The Person class is general and contains only general "Person" data, the Student and Professor are specializations of the Person class (i.e. they inherit it).

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.