oop Flashcards
public classes cannot be altered
false, they can be altered outside of it’s class.
private: you can only alter it in it’s class, never outside
when you don’t intialize the class as public or private, it well assume by default that it is:
public
the default value that java will give a public numeric variable:
0
the default value that java will give a public char/string:
null
the default value that java will give a public boolean variable:
false
T/F: we can access attributes inside an object by the name of object and dot (period) (access member)
true
To use an object from another class it must be in the same ________
folder
public void setTime(int h , int m, int s)
we call this:
setter (Mutator)
public int getSec(){
return sec;
}
we call this:
getter (Accessors)
a constructor with empty paranthesis is called
parametrized constructor
when i don’t have any constructor in my class and java makes/gives me a constructor
default constuctor
T/F: java conducts a defaults constuctor if my code doesn’t have a constructor.
true.
UML stands for
unified model language
the UML is composed in three parts:
1) the name of the class,
2) the names of the variables, their type and whether they are public (+) or private (-),
3) and lastly the methods, their names next to it’s type
T/F: A constructor is always public.
true