Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip

BLUF - Bottom Line Up Front

In module 2, we start to take a look at Java classes. In Java, a class is a blueprint for creating objects (a particular data structure), providing initial values for state (member variables or attributes), and implementations of behavior (member functions or methods). A class can also define interfaces and inherit from other classes.

In this module, we will address the following concepts.

  1. Control Structures

  2. Objects and Classes

  3. Constructors

  4. Object Attributes, Methods, Accessor, and Mutator functions (getters/setters).

  5. OOP Design

Info

Chapter Topics Module

3:

2:

Selection Logic (Conditional Flow) Selection Logic simply involves a number of conditions or parameters which decides one out of several written modules. The structures which use these type of logic are known as Conditional Structures.

Java is an object-oriented programming language. Everything in Java is associated with classes and objects, along with their attributes and methods. For example: in real life, a car is an object. The car has attributes, such as weight and color, and methods, such as drive and brake. A Class is an object constructor or a "blueprint" for creating objects.

  • Object − Objects have states and behaviors. Example: A dog has states - color, name, and breed as well as behaviors – wagging the tail, barking, eating. An object is an instance of a class.

  • Class − A class can be defined as a template/blueprint that describes the behavior/state that the object of its type support.

Image Added