Suppose an object of this class is initialized so the value of descriptor is "regular". What would be returned by the call makesentence(3, false) made on this object?.

Respuesta :

The return string by the call makesentence(3, false) on the object is "Object is not very very very regular"

The flow of the program

From the complete question, the string s is initialized as:

String s = "Object is ";

Also, we have the following function definition:

makeSentence(int quant, boolean sign)

By comparing the above definition to the function parameter, we have:

  • quant = 3
  • sign = false

When sign == false, then the string "not" is appended to the string s.

So, the updated string becomes:

s = "Object is not "

In the function body, an iteration is repeated "quant" times.

In each iteration, the string "very" is appended to the string s.

Given that s = "Object is "; and quant = 3, then the updated string becomes

s = "Object is not very very very "

Lastly, the value of descriptor is "regular".

So, the updated string becomes

s = "Object is not very very very regular"

Hence, the returned string is "Object is not very very very regular"

Read more about functions at:

https://brainly.com/question/25784459