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. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type






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






3. New memory space is reserved for that variable every time an instance of the class that is created.






4. Boolean type conversions are ___________






5. Constructor: creates a new pseudorandom number generator.






6. Constructors do not even _______; therefore they cannot return a value.






7. Returns a string containing the specified number formatted according to this object's pattern.






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






9. Occurs when a value of one type is assigned to a variable of another type during which the value is converted to the new type.






10. Before you use a variable __________it






11. sides=10;






12. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.






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






14. When two variables contain the same address and therefore refer to the same object; one important implication of _________ is that when we use one ref to change an object - it is also changed for the other reference because there is really only one o






15. Instance data should be defined with what________ visibility






16. The idea that we can refer to multiple types of related objects over time in consistent ways. it gives us the ability to design powerful and elegant solutions to problems that deal with multiple objects.






17. They clarify the role a certain number has in the program.






18. ______________ operators have higher precedence






19. Cast operator has _________ precedence to division






20. Constructor: creates a new string object with the same characters as str.






21. 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.






22. Expressed in a Java program with single quotes






23. Attempts to find the next occurence of the specified pattern - ignoring delimiters






24. Widening byte: _________ - to int - to long - to float - to double






25. 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






26. The one that is invoked






27. Variables that don't contain any data






28. Variables and constants can be referenced in any method of the class by declaring at the _________






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






30. format for constants: all upper-case; separated by ________






31. Returns the character at the specified index.






32. Also called a selection statement b/c it allows us to choose which statement will be executed next.






33. 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






34. ++count; -- count






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






36. The Scanner class is part of ___________________






37. An explicit data value used in a program






38. Four integer data types: byte - short - int - _____






39. ____________ is instantiated in the traditional way using the new operator.






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






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






42. When a variable is declared inside a method






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






44. Occurs automatically when certain operators need to modify their opeands in order to perform the operation






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






46. The values it stores internally - which may be represented as primitive data or as other objects. for example - a bank account object can store a floating point number (a primitive value) that represents the balance of the account. it can also contai






47. Instructs the compiler to reserve a portion of main memory space large enough to hold a particular type of value and indicates the name by which we refer to that location






48. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.






49. Two categories of statements that control the flow of executing through a method: __________ and loops






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