Presentation is loading. Please wait.

Presentation is loading. Please wait.

JAVA CLASSES, METHODS AND VARIABLES.  Defined Noun: A set or category of things having some property or attribute in common and differentiated from others.

Similar presentations


Presentation on theme: "JAVA CLASSES, METHODS AND VARIABLES.  Defined Noun: A set or category of things having some property or attribute in common and differentiated from others."— Presentation transcript:

1 JAVA CLASSES, METHODS AND VARIABLES

2  Defined Noun: A set or category of things having some property or attribute in common and differentiated from others by kind, type, or quality.  For example, a "Banana" class would represent the properties and functionality of bananas in general.  Here we have the class. “Bug” as you can see we have declared the class in the statement. A CLASS

3  #LO2: A Java class is a group of Java methods and variables.  #LO3: A Java method is a set of Java statements which can be included inside a Java class. OBJECTIVES

4  A procedure for accomplishing something.  The Bicycle class uses the following lines of code to define its fields:  public int cadence;  public int gear;  public int speed;  Here, we have the method “Act” A METHOD

5  Variables are devices that store data in memory (much like short our short term memory).  ‘Int’ is used here in the mover class to declare the data type Integer.  Which variables can you see here. A VARIABLE

6  #LO4: Development of code with a Mover class. Inheriting methods from a class.  #LO5: Introduction to the code editor to add code to make actors move. OBJECTIVES *The 'Mover' class is a subclass of Actor. * A Mover is an actor that also has 'move' and 'turn' ability. Both moving and turning * are relative to its current position. When moving, the Mover will move in the direction * it is currently facing. * Both 'move' and 'turn' methods are available with or without parameters.


Download ppt "JAVA CLASSES, METHODS AND VARIABLES.  Defined Noun: A set or category of things having some property or attribute in common and differentiated from others."

Similar presentations


Ads by Google