1 / 16

Modularity

Modularity. Methods & Class as program unit. A method is comprised of statement sequences and is often viewed as the smallest program unit to be considered as a subprogram. It is self-contained and designed for a particular task which represents an object behavior. .

heinz
Télécharger la présentation

Modularity

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Modularity

  2. Methods & Class as program unit • A method is comprised of statement sequences and is often viewed as the smallest program unit to be considered as a subprogram. It is self-contained and designed for a particular task which represents an object behavior.

  3. Object & Class properties • Properties defined in a class can be distinguished into object and class proper-ties. • Object properties are definitions that are specific to objects and apply to all objects from the same class. • Class properties, on the other hand, apply only to the class even though the structure and behavior of objects of a class is defined by the class.

  4. Counting Instance

  5. Alternative Counting Instance

  6. State of Objects

  7. Share Attributes with static

  8. Share Attributes with static

  9. Class Attributes • The static variable count is also known as a class attribute. While a class definition specifies the structure and behavior of objects within, it may have its own attribute and method definitions.

  10. Class Methods

  11. Class Methods

  12. Controlling Visibility

  13. Controlling Visibility

  14. Packages • While class definitions are practical modular units, the Java programming language has another mechanism that facilitates programming teams and reusable software units. • The package facility allows for appropriate classes to be grouped into packages. As with standard design rationale for objects where relevant methods are placed in the same class definition, packages in Java form the next level of software containment for classes with logically related functionality.

  15. Packages

  16. Import keyword

More Related