Question: in java oop, if a variable is marked private for example: private int MyTemp; What is needed to set the value of MyTemp? A private

  1. in java oop, if a variable is marked private for example: private int MyTemp; What is needed to set the value of MyTemp?

    1. A private get() method;

    2. A public get() method;

    3. A private set() method;

    4. A public set() method;

  1. Suppose that there exists an abstract class called shape. Which is the proper code to extend shape with the circle class:

    1. class Circle extends Shape

    2. class Shape extended by Circle

    3. Class Circle includes Shape

    4. Class Circle is a Shape

  1. If a variable is marked private for example: private int MyTemp; What is needed to retrieve the value of MyTemp?

    1. A private get() method;

    2. A public get() method;

    3. A private set() method;

    4. A public set() method;

  1. Suppose that a class provides a different method response on the values passed into the class. For instance, classname(string), classname(string, integer), classname(string, float). What is used in the class to accommodate this functionality?

    1. Stack

    2. Heap

    3. Constructor

    4. Object instance

  1. Suppose there is a class which extends a superclass. Now, in the extended class, a different calculation is required for volume, area or temperature. What is the directive in the extension class for the calculation?

    1. Private

    2. Public

    3. @override

    4. This

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!