MidTerm 2 Flashcards
(28 cards)
A sequence of instructions with a name____
Method
____are supplied when a method is called
Parameters
the method ___ is the result that the method computes
Return
when writing a method, we only present the___of the method to the user of the method.
Abstraction
the action of hiding the implementation is known as___
Encapsulation
The engineering term for encapsulation is ___
black box
In Java, a method can never change the contents of a____ that is passed to that method.
Variable
A java program contains ___classes
1 or more
The____is a special static method that Java recognizes as an entry point into a program.
main method
The ___acts as a table of contents or set of directions to control the flow of the program
main method
Every class must have these 3 basic functions of every computation.
input, process, output
A ___ is a special method that is called when an object is instantiated to initialize the instance variables
constructor
The purpose of a constructor is to _____
initialize a newly created object
The name of the constructor must match the ___name
class
A class can have how many constructors?
1 or more
object oriented programming
solve tasks using collaborative objects
class describes a set
objects with the same behavior
to construct a new object of a class we ____it by using the ___ operator.
instantiate
new
Once you have instantiated an object, you can utilize its
methods
These methods are called ___ because they are invoked on an object
instance methods
When we use methods of different classes we must specify the
class name and instance method name
When you create a class you will encapsulate it, this involves
hiding the implementation and creating / providing public interface
The public interface of a class consists of..
all the instance methods that a user of your class might want to apply to it objects
The___make up the public interface of the class.
method declaration