Classes are the blueprints for Objects. In Object-Oriented design terms, each Object (created shoe) is created using the class (blueprint) and it is called an instance of a class. In other words, each object created from the class can have a specific state for each of its attributes but has the same attributes and operations from the same class.
In the Java Programming Language context, attributes are represented by variables and operations by methods. Variables are using to hold data while methods are used to perform operations.
Designing Classes:
Classes are modeled in the Design stage where each class is represented as a Class diagram in the UML (Unified Modeling Language) notation. In the Class diagram box, it starts with ClassName at the top followed by a list of attributes variables (attributeVariableName) which may include a range of values and list of methods (methodName).
0 comments:
Post a Comment