<< Prev Question Next Question >>

Question 82/200

Given:

This class is poorly encapsulated. You need to change the circle class to compute and return the area instead.
What three modifications are necessary to ensure that the class is being properly encapsulated?

LEAVE A REPLY

Your email address will not be published. Required fields are marked *

Question List (200q)
1 commentQuestion 1: Given the code fragment: (Exhibit) What is the result?...
Question 2: Given: (Exhibit) What is the result?...
Question 3: Given the code format: (Exhibit) Which code fragment must be...
Question 4: Given the code fragment: (Exhibit) What is the result?...
Question 5: View the exhibit. (Exhibit) Given the code fragment: (Exhibi...
Question 6: Which two will compile, and can be run successfully using th...
Question 7: Given: (Exhibit) What is the result?...
Question 8: Given the code fragment: (Exhibit) What is the result?...
Question 9: Given: (Exhibit) How many objects have been created when the...
Question 10: Given: (Exhibit) Which two definitions of class C are valid?...
Question 11: Given: (Exhibit) What is the result?...
Question 12: (Exhibit) Which two are possible outputs?...
Question 13: A method is declared to take three arguments. A program call...
1 commentQuestion 14: Given the code fragment: (Exhibit)...
Question 15: Given: (Exhibit) Which code fragment, when inserted at line ...
Question 16: Given: (Exhibit) What is the result?...
Question 17: Which two are valid instantiations and initializations of a ...
Question 18: Given: (Exhibit) What is the result?...
Question 19: Given: (Exhibit) Which statement, when inserted into line 5,...
Question 20: Given: (Exhibit) What is the result?...
Question 21: Given: (Exhibit) What is the result?...
Question 22: Given a code fragment: (Exhibit) What is the result?...
Question 23: Given: (Exhibit) Which line causes a compilation error?...
Question 24: Which three are advantages of the Java exception mechanism?...
Question 25: Given: (Exhibit) What is the result?...
Question 26: Given: (Exhibit) What is the result?...
Question 27: Given: (Exhibit) What is the result?...
Question 28: Given: (Exhibit) What is the result?...
Question 29: Given the code fragment: String h1 = "Bob"; String h2 = new ...
Question 30: Given the code fragment: (Exhibit) What is the result?...
Question 31: A method is declared to take three arguments. A program call...
Question 32: Given: (Exhibit) Which constructor initializes the variable ...
1 commentQuestion 33: Identify two benefits of using ArrayList over array in softw...
Question 34: (Exhibit) Which three lines are illegal?...
Question 35: Given: (Exhibit) What is the result?...
Question 36: Given: (Exhibit) What is the reference type of myZ and what ...
Question 37: Which statement is true about the default constructor of a t...
Question 38: View the exhibit: (Exhibit) What is the result?...
Question 39: Given: (Exhibit) What is the result?...
Question 40: Given: (Exhibit) Which two classes use the shape class corre...
Question 41: Which statement initializes a stringBuilder to a capacity of...
Question 42: Given: (Exhibit) And the commands: Javac Jump.java Java Jump...
Question 43: Given: (Exhibit) Which two code fragments, when inserted at ...
Question 44: Which statement will empty the contents of a StringBuilder v...
Question 45: Given: (Exhibit) What is the result?...
Question 46: Given the for loop construct: (Exhibit) Which two statements...
Question 47: Given: (Exhibit) Which three are valid?...
Question 48: Given the following code fragment: (Exhibit) What is the res...
Question 49: Given: (Exhibit) What is the result?...
Question 50: Given: (Exhibit) What is the result?...
Question 51: Which three are valid types for switch?...
1 commentQuestion 52: Which code fragment cause a compilation error?...
Question 53: Given: (Exhibit) What is the result?...
Question 54: Given: (Exhibit) What three modifications, made independentl...
Question 55: Which two items can legally be contained within a java class...
Question 56: Given: (Exhibit) What is the result?...
Question 57: Given the code fragment: (Exhibit) Which code fragment, when...
Question 58: Given the code fragment: (Exhibit) What is the result?...
Question 59: Which two are Java Exception classes?...
Question 60: Given the code fragment: (Exhibit) What is the result if the...
Question 61: Given: (Exhibit) What is the result?...
Question 62: The catch clause argument is always of type__________....
Question 63: Given: (Exhibit) Which two are possible outputs? (Exhibit)...
Question 64: Given: (Exhibit) Which two actions, used independently, will...
Question 65: Given the following code: (Exhibit) What will make this code...
Question 66: Which two statements are true for a two-dimensional array?...
Question 67: Which three statements are benefits of encapsulation?...
Question 68: Given: (Exhibit) Which two code fragments are valid? (Exhibi...
Question 69: Given: (Exhibit) What is the result?...
Question 70: Which declaration initializes a boolean variable?...
Question 71: Given: (Exhibit) What is printed out when the program is exe...
Question 72: Given: (Exhibit) Which two declarations will compile?...
Question 73: Given: (Exhibit) Which two modifications, made independently...
Question 74: Given: (Exhibit) What will be the output? (Exhibit)...
Question 75: Given: (Exhibit) What is the result?...
Question 76: Given the code fragment: interface SampleClosable { public v...
Question 77: Given the code fragment: (Exhibit) Which two statements, whe...
Question 78: Given: (Exhibit) Which two code fragments, when inserted ind...
Question 79: Given: (Exhibit) What is the result?...
Question 80: (Exhibit) What should keyword1 and keyword2 be respectively,...
Question 81: Given: (Exhibit) What is the result?...
Question 82: Given: (Exhibit) This class is poorly encapsulated. You need...
Question 83: Given: (Exhibit) What is the result?...
Question 84: Given: (Exhibit) What is the result? (Exhibit)...
Question 85: Given the code fragment: System.out.printIn("Result: " + 2 +...
Question 86: Given: (Exhibit) What is the result?...
Question 87: Given: (Exhibit) Which two items are fields?...
Question 88: Given: (Exhibit) Which two options, when inserted independen...
Question 89: Given the code fragment: (Exhibit) What is the result?...
Question 90: Which two are valid declarations of a two-dimensional array?...
Question 91: Given: (Exhibit) What should statement1, statement2, and sta...
Question 92: Given: (Exhibit) What is the result?...
Question 93: Given: (Exhibit) What is the output?...
Question 94: Given: (Exhibit) Which three lines will compile and output "...
Question 95: Given the code fragment: (Exhibit) Which code fragment, when...
Question 96: Given: (Exhibit) Which code fragment, when inserted at line ...
Question 97: Given the fragment: (Exhibit) What is the result?...
Question 98: Given: (Exhibit) What is the result?...
Question 99: (Exhibit) What is the result?
Question 100: Given: (Exhibit) What is the result?...
Question 101: Given the code fragment: (Exhibit) Which statement is true?...
Question 102: Given the code in a file Traveler.java: (Exhibit) And the co...
Question 103: Given the classes: * AssertionError * ArithmeticException * ...
Question 104: Given the code fragment: (Exhibit) What values of x, y, z wi...
Question 105: Given: (Exhibit) What is the result?...
Question 106: Given the code fragment: (Exhibit) Which code fragment print...
Question 107: Which two actions will improve the encapsulation of a class?...
Question 108: Given: (Exhibit) How many objects are created in the memory ...
Question 109: Given: (Exhibit) And the command line invocation: Java gradi...
Question 110: Given the fragment: (Exhibit) What is the result?...
Question 111: Given: (Exhibit) What is the result?...
Question 112: Given: (Exhibit) What is the result?...
Question 113: Which code fragment is illegal? (Exhibit)...
Question 114: Given: (Exhibit) The class is poorly encapsulated. You need ...
Question 115: The protected modifier on a Field declaration within a publi...
Question 116: Given the fragments: (Exhibit) Which line causes a compilati...
Question 117: Given the code fragment: (Exhibit) What could expression1 an...
Question 118: Given: (Exhibit) And the commands: Javac Test.java Java Test...
Question 119: Given: (Exhibit)
Question 120: Which three statements are true about the structure of a Jav...
Question 121: Given the code fragment: (Exhibit) What is the result?...
Question 122: Given: (Exhibit) What is the result?...
Question 123: Given the code fragment: (Exhibit) What is the result?...
Question 124: Which two may precede the word 'class' in a class declaratio...
Question 125: Given: (Exhibit) What is the result?...
Question 126: Given: (Exhibit) What is the result?...
Question 127: Given: (Exhibit) What should statement1, statement2, and sta...
Question 128: Given the code fragment: (Exhibit) Which three code fragment...
Question 129: Given: (Exhibit) How many times is 2 printed as a part of th...
Question 130: Given the class definitions: (Exhibit) And the code fragment...
Question 131: Given the code fragment: (Exhibit) What is the result?...
Question 132: Given the code fragment: System.out.printIn ("Result: " +3+5...
Question 133: Given the code fragment: (Exhibit) What is the result?...
Question 134: Given: (Exhibit) What is the result?...
Question 135: Give: (Exhibit) What is the result?...
Question 136: Give: Public Class Test { } Which two packages are automatic...
Question 137: Given the code fragment: (Exhibit) Which code fragment print...
Question 138: You are writing a method that is declared not to return a va...
Question 139: Given: (Exhibit) What is the result?...
Question 140: Given the code fragment: (Exhibit) Which line of codes print...
Question 141: Given the following four Java file definitions: // Foo.java ...
Question 142: Given: (Exhibit) What is the result?...
Question 143: Given: (Exhibit) What code should be inserted? (Exhibit)...
Question 144: Given the code fragment: (Exhibit)...
Question 145: Given: (Exhibit) What is the result?...
Question 146: Which three are bad practices?
Question 147: (Exhibit) What is the result?
Question 148: Given the code fragment: (Exhibit) What is the result?...
Question 149: Given: (Exhibit) What is the result?...
Question 150: Given: (Exhibit) What is result?...
Question 151: Given: (Exhibit) What is the result?...
Question 152: Given the code fragment: (Exhibit) What is the result?...
Question 153: Given: (Exhibit) What is the result?...
Question 154: Given: (Exhibit) Why will the code not compile?...
Question 155: Given: (Exhibit)
Question 156: View the Exhibit. (Exhibit) Which statement sets the name of...
Question 157: Which is a valid abstract class?...
Question 158: Given the fragment: (Exhibit) Which code fragment when inser...
Question 159: Given: (Exhibit)
Question 160: Given: (Exhibit) Which code fragment can be inserted at line...
Question 161: Given the code fragment (Exhibit) What is the result?...
Question 162: Given: (Exhibit) What is the result?...
Question 163: Which two statements are true for a two-dimensional array of...
Question 164: Given: (Exhibit) What is true about the class Wow?...
Question 165: Given: (Exhibit) What is the result?...
Question 166: Given the code fragments: (Exhibit) What is the result?...
Question 167: Given: (Exhibit) What is the result?...
Question 168: (Exhibit) What is the result? (Exhibit)...
Question 169: (Exhibit) What is the result?
Question 170: Given: (Exhibit) What is the result?...
Question 171: Given: (Exhibit) What is the result?...
Question 172: Given a java source file: (Exhibit) What changes will make t...
Question 173: Given the code fragment: (Exhibit) What is the result?...
Question 174: Given: (Exhibit) What is the result?...
Question 175: Given: (Exhibit) What is the result?...
Question 176: Given the code fragment: (Exhibit) How many times is 2 print...
Question 177: Given: (Exhibit) What is the result?...
Question 178: A method doSomething () that has no exception handling code ...
Question 179: Given: (Exhibit) Which approach ensures that the class can b...
Question 180: Given: (Exhibit) What is the result?...
Question 181: Which two statements are true?
Question 182: Given the code fragment: (Exhibit) Which code fragment, when...
Question 183: Give: (Exhibit) What value should replace kk in line x to ca...
Question 184: Given: class X {} class Y { Y ( ) { } } class Z { Z (int i )...
Question 185: Given: (Exhibit) What is the result?...
Question 186: Given the code fragment: (Exhibit) What is the result?...
Question 187: Given the code fragment: (Exhibit) Which code fragments, ins...
Question 188: Given the code fragment: (Exhibit) What is the result?...
Question 189: Given: (Exhibit) What is the result?...
Question 190: Given: (Exhibit) This class needs to protect an invariant on...
Question 191: Given the code fragment: (Exhibit) What is the result?...
Question 192: Given the code fragment: (Exhibit) Using StringBuilder, whic...
Question 193: Given: (Exhibit) What is the result?...
Question 194: Given: (Exhibit) What is the result?...
Question 195: Given the code fragment? (Exhibit) Which method can be inser...
Question 196: Given: (Exhibit) What is the result?...
Question 197: View the exhibit: (Exhibit) Which line of code initializes a...
Question 198: Given: (Exhibit) What is the result?...
Question 199: View the exhibit: (Exhibit) Given: (Exhibit) What is the res...
Question 200: Given: (Exhibit) What is the result?...