2026 SOLVED QUESTIONS GRADED A+
◉ Class. Answer: Blueprints of an object
◉ UML class diagram. Answer: describes the structure of a class by
displaying the class name (first row), variables (second row), and
methods (third row).
◉ Instance variable. Answer: a variable defined in a class for which
every object of the class has its own value
◉ Method. Answer: A block of code that, when called, performs specific
actions mentioned in it
◉ The null constant. Answer: indicates the null value / has no data type
◉ Void Method. Answer: Method that does not return a value
◉ Method header. Answer: Public / void/ writeOutput / ()
, ◉ Method Body. Answer: a sequence of statements to execute when the
method is called, and must be surrounded by { and }
◉ this. Answer: refers to the object that is performing the action
specified by the method
◉ Local Variable. Answer: temporary variable that exist only in a
particular function o block of statements
◉ Parameter. Answer: Information that is passed to a method / act as
variables inside the method
◉ Accessor method / Getter. Answer: Allows access to private variables
not inside the class
◉ Mutator method / Setter. Answer: Allows changing of a private
variable not inside the class
◉ Information hiding. Answer: a programmer using a method needs to
knowwhat the method does, not how it does it
◉ Precondition comment. Answer: states the conditions that must be
true before the method is called.