CSE 1322 LAB AND LECTURE EXAM 3
COMPLETE STUDY GUIDE AND
INTRODUCTORY PROGRAMMING REVIEW
2026
◉ The class from which we inherit is referred to as
Answer: parent class or base class / super class
◉ What does the keyword base indicate?
Answer: that the base class must be used allows access to its
methods, constructors and member variables. Using base(), we can
call the constructor of the base class. Using base.Method(...) we can
invoke a method of the base class, pass parameters to it and use its
results. Using base.field we can get the value of a member variable
from the base class or assign a different one to it
◉ When inheriting a class,
Answer: our constructors must call the base class constructor, so
that it can initialize its member variables.
◉ The keyword protected:
,Answer: defines class members which are not visible to users of the
class (those who initialize and use it), but are visible to all inheriting
classes (descendants)
◉ The keyword protected internal:
Answer: defines class members which are both internal, i.e. visible
within the entire assembly, and protected, i.e. not visible outside the
assembly, but visible to classes who inherit it (even outside the
assembly)
◉ When a base class is inherited:
Answer: All of its public, protected and protected internal members
(methods, properties, etc.) are visible to the inheriting class. - All of
its private methods, properties and member-variables are not visible
to the inheriting class. - All of its internal members are visible to the
inheriting class, only if the base class and the inheriting class are in
the same assembly (the same Visual Studio project).
◉ Downcasting
Answer: casting a superclass to a subclass
◉ A method, which can be overridden, is called
Answer: virtual
,◉ What is the difference between overloading and overriding
methods?
Answer: overloading is when there are 2 methods with the same
name but different parameters but overriding is when inherited
methods are being redefined in another class
◉ The class with which inherit from the parent class is referred to as
either one of these:
Answer: a derived class, a sub class, or child class
◉ Can you instantiate an abstract class?
Answer: no
◉ Polymorphism
Answer: where a variable is changing types while the program is
running
◉ What does inheritance allow?
Answer: a new class to "absorb" an existing class's members
◉ How does inheritance save time?
Answer: by reusing proven and debugged high-quality software
, ◉ UML
Answer: Unified Modeling Language
◉ UML Diagram
Answer: graphical representation of relationship between classes
and is used for depicting objects and object oriented concepts
◉ When should inheritance be used?
Answer: when classes are similar
◉ What does inheritance support?
Answer: through an extended / derived class supports code reuse.
◉ A method override occurs when two methods in the same class
have the exact same method signature. True or False?
Answer: False
◉ toString( )(Java) or ToString() (C#) is a method that is in the
Object class that is inherited by all Java / C# classes. True or False?
Answer: True
◉ When a set of methods have the same name but different
types/number of parameters in the same class, they are called:
COMPLETE STUDY GUIDE AND
INTRODUCTORY PROGRAMMING REVIEW
2026
◉ The class from which we inherit is referred to as
Answer: parent class or base class / super class
◉ What does the keyword base indicate?
Answer: that the base class must be used allows access to its
methods, constructors and member variables. Using base(), we can
call the constructor of the base class. Using base.Method(...) we can
invoke a method of the base class, pass parameters to it and use its
results. Using base.field we can get the value of a member variable
from the base class or assign a different one to it
◉ When inheriting a class,
Answer: our constructors must call the base class constructor, so
that it can initialize its member variables.
◉ The keyword protected:
,Answer: defines class members which are not visible to users of the
class (those who initialize and use it), but are visible to all inheriting
classes (descendants)
◉ The keyword protected internal:
Answer: defines class members which are both internal, i.e. visible
within the entire assembly, and protected, i.e. not visible outside the
assembly, but visible to classes who inherit it (even outside the
assembly)
◉ When a base class is inherited:
Answer: All of its public, protected and protected internal members
(methods, properties, etc.) are visible to the inheriting class. - All of
its private methods, properties and member-variables are not visible
to the inheriting class. - All of its internal members are visible to the
inheriting class, only if the base class and the inheriting class are in
the same assembly (the same Visual Studio project).
◉ Downcasting
Answer: casting a superclass to a subclass
◉ A method, which can be overridden, is called
Answer: virtual
,◉ What is the difference between overloading and overriding
methods?
Answer: overloading is when there are 2 methods with the same
name but different parameters but overriding is when inherited
methods are being redefined in another class
◉ The class with which inherit from the parent class is referred to as
either one of these:
Answer: a derived class, a sub class, or child class
◉ Can you instantiate an abstract class?
Answer: no
◉ Polymorphism
Answer: where a variable is changing types while the program is
running
◉ What does inheritance allow?
Answer: a new class to "absorb" an existing class's members
◉ How does inheritance save time?
Answer: by reusing proven and debugged high-quality software
, ◉ UML
Answer: Unified Modeling Language
◉ UML Diagram
Answer: graphical representation of relationship between classes
and is used for depicting objects and object oriented concepts
◉ When should inheritance be used?
Answer: when classes are similar
◉ What does inheritance support?
Answer: through an extended / derived class supports code reuse.
◉ A method override occurs when two methods in the same class
have the exact same method signature. True or False?
Answer: False
◉ toString( )(Java) or ToString() (C#) is a method that is in the
Object class that is inherited by all Java / C# classes. True or False?
Answer: True
◉ When a set of methods have the same name but different
types/number of parameters in the same class, they are called: