Question

Question 2 2 pts Mutator methods are generally O public O private protected none of these
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer: public

Explanation: Mutator methods are used to provide control to change the private/protected data inside the class so this methods needs to be exposed to outside class for access. Hence it should always be made public.

Question 2 2 pts Mutator methods are generally public private O protected none of these

Add a comment
Know the answer?
Add Answer to:
Question 2 2 pts Mutator methods are generally O public O private protected none of these
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • JAVA Question 1 When implementing a method, use the class’s set and get methods to access...

    JAVA Question 1 When implementing a method, use the class’s set and get methods to access the class’s ________ data. a. public. b. private. c. protected. d. All of the above. Question 2 Set methods are also commonly called ________ methods and get methods are also commonly called ________ methods. a. query, mutator. b. accessor, mutator. c. mutator, accessor. d. query, accessor. Question 3 Composition is sometimes referred to as a(n) ________. a. is-a relationship b. has-a relationship c. many-to-one...

  • also write accessor and mutator methods for the class. please Given the CarRecord class definition below...

    also write accessor and mutator methods for the class. please Given the CarRecord class definition below define the following: 1) A default constructor that initializes yearMade to 2006 and vehicleldNum to 1000. 2) An overloaded constructor that initializes yearMade and vehicleldNum to values passed as parameters. public class CarRecord { private int yearMade; private int vehicleldNum; }

  • For Questions 1-3: consider the following code: public class A { private int number; protected String...

    For Questions 1-3: consider the following code: public class A { private int number; protected String name; public double price; public A() { System.out.println(“A() called”); } private void foo1() { System.out.println(“A version of foo1() called”); } protected int foo2() { Sysem.out.println(“A version of foo2() called); return number; } public String foo3() { System.out.println(“A version of foo3() called”); Return “Hi”; } }//end class A public class B extends A { private char service; public B() {    super();    System.out.println(“B() called”);...

  • For Questions 1-3: consider the following code: public class A { private int number; protected String...

    For Questions 1-3: consider the following code: public class A { private int number; protected String name; public double price; public A() { System.out.println(“A() called”); } private void foo1() { System.out.println(“A version of foo1() called”); } protected int foo2() { Sysem.out.println(“A version of foo2() called); return number; } public String foo3() { System.out.println(“A version of foo3() called”); Return “Hi”; } }//end class A public class B extends A { private char service; public B() {   super();   System.out.println(“B() called”); } public...

  • Question 1 10 pts Inheritance is a capability of C++ to represent increased specialization that is...

    Question 1 10 pts Inheritance is a capability of C++ to represent increased specialization that is often found in real world relationships. True False Question 2 10 pts Inheritance between a child and parent object exhibits an 'relationship. Question 3 10 pts As you move down an inheritance relationship from parent to child, you typically move from a general to specific description. True False Question 4 10 pts The syntax for declaring DerivedClass to publicly inherit from BaseClass is given...

  • Question 5 A callable bond O is generally call protected during the entire term of the bond issue. O generally will...

    Question 5 A callable bond O is generally call protected during the entire term of the bond issue. O generally will have a call protection period during the final three years prior to maturity. O may be structured to pay bondholders the current value of the bond on the date of call. O is prohibited from having a sinking fund also is frequently called at a price that is less than par value.

  • Question 15 1 pts Put most simply providers (ex.doctors) can be paid through private sources or...

    Question 15 1 pts Put most simply providers (ex.doctors) can be paid through private sources or public, in which system are providers paid (generally) through public funds O NHI (Canada) OSHI (Germany) NHS (UK) Kaiser (US) Question 16 1 pts Of the following which country's healthcare system used public financing but private delivery O Canada Germany O UK

  • Consider the following class designed to store weather statistics at a particular date and time: public...

    Consider the following class designed to store weather statistics at a particular date and time: public class WeatherSnapshot {     private int tempInFahrenheit;     private int humidity;        // value of 56 means 56% humidity     private int dewPoint;        // in degrees Fahrenheit     private String date;         // stores the date as a String     private int time;            // in military time, such as 1430 = 2:30 pm     private boolean cloudy;      // true if 25% or more of the sky is covered     // constructor not shown, but it...

  • How do the public, private and protected keywords affect inheritance of the use of data and...

    How do the public, private and protected keywords affect inheritance of the use of data and function members of a parent class by a child class.

  • Question 1 1 pts Which of the following is not a valid class name in Java?...

    Question 1 1 pts Which of the following is not a valid class name in Java? O MyClass MyClass1 My_Class MyClass# Question 2 1 pts Which of the following statements is False about instance variables and methods? Instance variables are usually defined with private access modifier. Instance variables are defined inside instance methods. Instance methods are invoked on an object of the class that contains the methods. A class can have more than one instance variables and methods. Question 3...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT