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 values passed into a method in an invocation; these are called the arguments to the method






2. Constructor: creates a new pseudorandom number generator.






3. Returns the character at the specified index.






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






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






6. System.out object represents an output device or file; we send the println message to the System.out object to request that some text be printed






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






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






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






10. The Scanner class is part of ___________________






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






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






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






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






15. Count++; count--






16. Three ways in which Java conversions occur: _________ conversion - promotion - casting






17. Every object has two things: a state and a _____ of behaviors






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






19. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.






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






21. Represents either a primitive value or an object






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






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






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






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






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






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






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






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






30. Sets the scanner's delimiting pattern.






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






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






33. Return type specified in the method header can be a primitive type - class name or the ________; when a method does not return any value - void is used as the return type - as is always done with the main method.






34. An explicit data value used in a program






35. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;






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






37. Delimited by double quotation characters






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






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






40. A ________________ is immutable.






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






42. _____ expression evaluated first






43. A name for a location in memory used to hold a data value.






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






45. Instance data should be defined with what________ visibility






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






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






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






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






50. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________