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 names of the parameters in the header of the method declaration






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






3. ++count; -- count






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






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






6. Methods in the Math class are ______






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






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






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






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






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






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






13. Sets the scanner's delimiting pattern.






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






15. Constructor: creates a new pseudorandom number generator.






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






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






18. The Scanner class is part of ___________________






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






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






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






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






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






24. Control access to the members of a class. the reserved words public and private are visibility modifiers that can be applied to the variables and methods of a class.






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






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






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






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






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






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






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






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






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






34. Count++; count--






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






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






37. Begins with a backslash character ""






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






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






40. Delimited by double quotation characters






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






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






43. Part of the standard Java class library - provides convenient methods for reading input values of various types. the input can come from various sources - including data typed interactively by the user or data stored in a file; the Scanner class can






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






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






46. ______________ operators have higher precedence






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






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






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






50. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked