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. _____ expression evaluated first






2. The declarations of object variables have a similar structure to the declaration of _______________






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






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






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






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






7. Returns the character at the specified index.






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






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






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






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






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






13. Variables that don't contain any data






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






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






16. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.






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






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






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






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






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






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






23. The Scanner class is part of ___________________






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






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






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






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






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






29. Instance data should be defined with what________ visibility






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






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






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






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






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






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






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






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






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






39. Declared in a class but not inside any particular method






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






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






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






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






44. An explicit data value used in a program






45. Begins with a backslash character ""






46. All wrapper classes are defined in ___________






47. ______________ operators have higher precedence






48. The classes of the Java standard class library are grouped into __________.






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






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