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. Returns a new string consisting of this string concatenated with str.






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






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






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






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






7. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.






8. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.






9. The classes of the Java standard class library are grouped into __________.






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






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






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






13. When a variable is declared inside a method






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






15. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.






16. sides=10;






17. A set of classes that supports the development of programs






18. declaration that creates a String variable that holds a reference to a String object; an object variable doesn't hold an object itself - it holds the address of an object






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






20. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.






21. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.






22. Constructor: creates a new pseudorandom number generator.






23. A null reference indicates that a variable does not refer to an object






24. Only two valid values: true and false; can indicate whether a particular condition is true - but can also be used to represent any situation that has two states - such as a light bulb being on or off






25. The names of the parameters in the header of the method declaration






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






27. Expressed in a Java program with single quotes






28. Each piece of data that we send to a method






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






30. A ________________ is immutable.






31. ______________ operators have higher precedence






32. Represents either a primitive value or an object






33. Cast operator has _________ precedence to division






34. Count++; count--






35. Boolean type conversions are ___________






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






37. Before you use a variable __________it






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






39. The blueprint of an object. establishes the kind of data an object of that type will hold and defines the methods that represent the behavior of such objects. however - a class contains no space to store data. each object has space for its own data -






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






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






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






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






44. 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:






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






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






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






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






49. We use an object when we have a _________ to it






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