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






2. A variable that refers to an object must be __________






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






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






5. Cast operator has _________ precedence to division






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






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






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






9. A ____________ and definition always give the parameter list in parentheses after the method name. if there are no parameters - an empty set of parentheses is used






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






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






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






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






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






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






16. An explicit data value used in a program






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






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






19. ++count; -- count






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






21. Before you use a variable __________it






22. _____ expression evaluated first






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






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






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






26. Defined and then used as the type of a variable when it is declared; establishes all possible values of a variable of that type by listing - or enumerating - them.






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






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






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






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






31. Four integer data types: byte - short - int - _____






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






33. Boolean type conversions are ___________






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






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






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






37. Elements of input






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






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






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






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






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






43. The Scanner class is part of ___________________






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






45. Attempts to find the next occurence of the specified pattern - ignoring delimiters






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






47. Begins with a backslash character ""






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






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






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