Java Class Terminology Flashcards Preview

Java 1 > Java Class Terminology > Flashcards

Flashcards in Java Class Terminology Deck (26)
Loading flashcards...


Allows a program/driver to create objects from the class (instantiate an object). Parameters() are optional.


Accessor? also know as a?

allows a driver/application to see the value of a private data members (variables) that is inside the class. known as: a getter (accessor).


Mutator? also known as?

allows a driver/application to alter the data value of a private variable that is within the class. also known as: a setter.


helping method? example?

Can be used within just the class by using a private access modifier we can also have a helping method that is used by the driver so that the results of private objects can be returned. example: public float calcTotal() { return (privateVariable + 2ndPrivateVariable); }



written within the class so that a driver can display a certain format pre determined. routinely displays data.



UML = Unified Modeling Language represents a specific class in visual manner. *We never add instance variables that are not in the UML diagram.



instantiate: when an object is created. Done within a class. the object inherits generic values from the class it is created in.


what are data members called?

data members: same as instantiated variables / fields.


what is a Method?

Method: Created within a class. set of instructions that makes an operation occur. (a formula that is contained within a word or object name).


what are the 5 parts that make up a method?

parts of method: 1- modifier 2- return type 3- method name 4- method signature 5- parameter


what is a method modifier?

method modifier: The access type of either public or private


what is a method return type?

method return type: the data type returned= char, int, double, float.


what is a method name?

method name: name i choose for the method to be called on later.


what is a method signature?

method signature: method name and parameter list combined


what is a method parameter?

method parameter: a placeholder.. when a method is invoked(used) a value is passed called the argument.


what is it called when a program or driver contains the main() method?

application -uses classes within their programs.


is input generated from: drivers, classes or applications

applications only.


user defined class?

class that is not part of the java library. was built by a programmer and does not contain input or output.


instance data?

non static data that can change values. usually declared at the top of a class.


local data items?

data items declared within class methods such as within a constructor, mutator or accessor.


describe what overriding is?

when an already defined method is overwritten with data that is custom or slightly different. **often used with toString() to produce custom output.


equals method used?

determines if two objects from the same class are the same. is a boolean of true or false and can be defined within a class.


how new objects are instantiated inside a driver?

the class name is used before the instantiated object name (new object) so that the constructor within the class can form the instantiated object the correct way. data is entered inside ().


what is the format of a mutator?

ObjectName.MutatorMethod (Arguments needed) example: customerName = in.nextLine(); System.out.print("enter in the name") ObjectJulie.setName (customerName);


what is a shortcut in code for the driver that will use the toString method with an object?

System.out.print(object); ^ is the same as System.out.print(object.toString());


Describe how a Method is set up.
visialize the different parts. How is it "built"?