ITSC 1213 Exam 1 Study guide with complete solutions!!
A class is a template for an - -object
-An object is an ____ of a class - -instance
-Class definitions have two parts - -Fields and methods
-What are the two types of access to class members we have done - -public and private
-What is the purpose of the constructor method? - -Used to initialize the instances of a class
-Creating an object is called - -instantiation
-A java project is made up of ____ definitions - -class
-A class file has two parts - -fields and methods
-Putting the data for an object and the methods that can access and change this data together
in the same file is called - -Encapsulation
-What are the two categories of data types in java - -primitive and reference
-The public class name in a java source code file must have the same names as the - -file name
-Suppose you have written a class definition for a student class.
Write the line of code you would use to declare a reference to a student object - -Student
referenceName;
-Write the line of code you would use to create a Student object and assign its address to the
reference you declared. - -referenceName = new Student();
-What is the purpose of the mutator(setter) methods? - -Stores a value in a field or in some
other way changes the value of the field
-What is the purpose of accesser (getter) methods? - -Get methods return a value from an
object
-What are the two categories of java types - -Primitave and reference
-What is a formal parameter - -The identifier used in a method to stand for the value that is
passed into the method by the caller
A class is a template for an - -object
-An object is an ____ of a class - -instance
-Class definitions have two parts - -Fields and methods
-What are the two types of access to class members we have done - -public and private
-What is the purpose of the constructor method? - -Used to initialize the instances of a class
-Creating an object is called - -instantiation
-A java project is made up of ____ definitions - -class
-A class file has two parts - -fields and methods
-Putting the data for an object and the methods that can access and change this data together
in the same file is called - -Encapsulation
-What are the two categories of data types in java - -primitive and reference
-The public class name in a java source code file must have the same names as the - -file name
-Suppose you have written a class definition for a student class.
Write the line of code you would use to declare a reference to a student object - -Student
referenceName;
-Write the line of code you would use to create a Student object and assign its address to the
reference you declared. - -referenceName = new Student();
-What is the purpose of the mutator(setter) methods? - -Stores a value in a field or in some
other way changes the value of the field
-What is the purpose of accesser (getter) methods? - -Get methods return a value from an
object
-What are the two categories of java types - -Primitave and reference
-What is a formal parameter - -The identifier used in a method to stand for the value that is
passed into the method by the caller