Midterm vocab Flashcards
(34 cards)
determine the accessibility of an object’s properties and methods to other methods in the app
access modifier
a method that is automatically called when an app is executed
Main Method
can be called from outside the class’s declaration’s body by methods of other classes
public accessor “public”
a methods return type, indicates that a method will not return any information to its calling method when it completes a task
keyword “void”
ex: public void DisplayMessage();
method header
ex: public static void Main(string[ ] args);
method can be called w/o first creating an object of the class
keyword “static”
are accessible to all classes in the same project
class types (creating new classes)
object creation expression
Gradebook mygb = new Gradebook();
ex: Gradebook mygb = new Gradebook(); creates a new object of the class specified to the right of the keyword (ie Gradebook)
new operator
required, the parenthesis in combination with a class name represent a call to the instructor, which is similar to a method, but used only at the time an object is created to initialize the object’s data
Gradebook mygb = new Gradebook()
graphical language used by programmers to represent their object-oriented systems in a standardized matter // summarizes a class’s attributes and operations
UML
ON A URL DIAGRAM:
+DisplayMethod()
public visibility symbol
additional information needed to perform a method
parameter
ex: public void DisplayMethod();
located in the parenthesis that follow the method name.
parameter list
indicates to the compiler that the app uses classes in a particular namespace
using directives
System.Console.WriteLine(“”);
fully qualified class name
variables declared in a body of a method and can only be used in that method
local variables
attributes represented by variables; declared inside a class declaration but outside the bodies of the class’s methods declarations
instance variables (fields)
used to manipulate an object’s attributes
property
accessible only to members of the class in which they’re declared
public accessor “private”
declaring instance variables with access modifier private
information hiding (encapsulation)
property declaration
ex:
private string courseName; (instance variable)
public string CourseName { get { return courseName; } set { courseName = value; } }
enables a client to read the value of an instance variable
get accessor
enables a client to modify the instance variable
set accessor