Test your basic knowledge |

Object Oriented Programming

Subject : it-skills
Instructions:
  • Answer 50 questions in 15 minutes.
  • If you are not ready to take this test, you can study here.
  • Match each statement with the correct term.
  • Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.

This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Defined and then used as the type of a variable when it is declared; establishes all possible values of a variable of that type by listing - or enumerating - them.






2. Since an object ref var holds the address of the object - it can be thought of as a ____ to the location in memory where the object is held






3. Expressed in a Java program with single quotes






4. A variable that refers to an object must be __________






5. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)






6. Begins with a backslash character ""






7. A value that is passed into a method when it is invoked






8. When a variable is declared inside a method






9. Returns the next input token as a character string.






10. Returns all input remaining on the current line as a character string.






11. Returns a new string consisting of this string concatenated with str.






12. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.






13. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight






14. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist






15. The values passed into a method in an invocation; these are called the arguments to the method






16. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to






17. An object has behaviors - which are defined by the ________ associated with that object.






18. Returns the next input token as the indicated type.






19. Returns the int corresponding to the value stored in the specified string






20. The act of creating an object using the "new" operator






21. A Java operator that is specified by a type name in parentheses; truncates rather than rounds; useful in division if u want an integer to be treated as a float or double






22. sides=10;






23. Delimited by double quotation characters






24. ______________ operators have higher precedence






25. Boolean type conversions are ___________






26. The Scanner class is part of ___________________






27. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.






28. How classes are created from other classes. the definition of one class can be based on another class that already exists. inheritance is a form of software reuse - capitalizing on the similarities between various kinds of classes that we want to cre






29. Cast operator has _________ precedence to division






30. After an object has been instantiated - we set the _________ to access its methods






31. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.






32. Changes a particular value - e.g.setX - where X is the value they are setting.






33. The order in which statements are executed in a running program






34. Modifier>type/void>identifier>parameters>method body






35. In the header of a method specifies he types of the values that are passed and the names by which the called method will refer to those values.






36. All wrapper classes are defined in ___________






37. The declarations of object variables have a similar structure to the declaration of _______________






38. Returns true if the scanner has anotehr token in its input.






39. White space characters such as space characters - tabs - and new lines that separate the elements of input






40. Instance data should be defined with what________ visibility






41. Count++; count--






42. This declaration creates a Scanner object that reads input from the keyboard






43. A method that returns a value must have a _________






44. Constructor: creates a new pseudorandom number generator.






45. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)






46. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:






47. Two floating data types: float - _______






48. Provide various methods related to the management of the associated primitive type. Used when we create an object that serves as a container to hold various types of other objects - and we want the object to hold a simple integer value. In this case






49. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.






50. A class usually provides services to access and modify __________