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






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






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






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






5. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.






6. A ________________ is immutable.






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






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






9. Constructor: creates a new pseudorandom number generator.






10. sides=10;






11. Variables that don't contain any data






12. Represents either a primitive value or an object






13. Methods in the Math class are ______






14. Sets the scanner's delimiting pattern.






15. Part of the java.util class; picks a number at random out of a range of values.






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






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






18. Making it difficult - if not impossible - for code outside of a class to "reach in" and chnage the value of a variable that is declared inside that class.






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






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






21. Before you use a variable __________it






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






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






24. The automatic conversion between a primitive value and a corresponding wrapper object.






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






26. _____ expression evaluated first






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






28. An object in Java - defined by the class String






29. A group of programming statements that is given a name. when a method is invoked - its statements are executed. a set of methods is associated with an object and defines its potential behaviors. to define the ability to make a deposit into a bank acc






30. Count++; count--






31. Elements of input






32. Boolean type conversions are ___________






33. Cast operator has _________ precedence to division






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






35. Returns the number of characters in this stirng.






36. A combo of one or more operators and operands that usually perform a calculation; operands can be literals - constants - variables - or other sources of data






37. All numeric types are _______ - meaning both positive and negative values can be stored in them






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






39. All wrapper classes are defined in ___________






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






41. Constants are ______ because the can't be changed once you use the final modifier






42. Instance data should be defined with what________ visibility






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






44. A special method that has the same name as the class. After the "new" operator creates the object it is invoked to help set it up initially






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






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






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






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






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






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