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. Changes a particular value - e.g.setX - where X is the value they are setting.






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






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. Returns all input remaining on the current line as a character string.






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






6. Elements of input






7. Methods in the Math class are ______






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






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






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






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






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






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






14. Returns a new string consisting of this string concatenated with str.






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






16. The one that is invoked






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






18. _____ expression evaluated first






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






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






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






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






23. ______________ operators have higher precedence






24. ++count; -- count






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






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






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






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






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






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






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






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






33. Cast operator has _________ precedence to division






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






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






36. Two floating data types: float - _______






37. A ________________ is immutable.






38. Returns the number of characters in this stirng.






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






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






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






42. An explicit data value used in a program






43. Expressed in a Java program with single quotes






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






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






46. Variables that don't contain any data






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






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






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






50. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar