Question: QUESTION 1 If the following is from the method section of a UML diagram, which of the following statements is TRUE? + add (object2:Stock): Stock
QUESTION 1 If the following is from the method section of a UML diagram, which of the following statements is TRUE? + add (object2:Stock): Stock ?This is a private method named add that accepts and returns objects of the stock class. O This is a private method named Stock that adds two objects. This is a public method named add that accepts and returns references to objects in the Stock class. O This is a public method named Stock that adds two objects. QUESTION 2 If you have defined a class named SavingsAccount with a public static data member named n umberofAccounts, and created a SavingsAccount object referenced by the variable a ccount20, which of the following will assign numberofAccounts to numAccounts? O numAccounts - account20 numAccounts O numAccounts - numberOfAceounts; numAccounts- SavingsAccount.numberOfAccounts None of these, you cannot reference a static data member QUESTION 3 This indicates the number of elements, or values, the array can hold. the version of Java O the new operator 0 the array's data type the array's size declarator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
