Consider the following instance variables and method from a class: private String descriptor; public String makeSentence(int quant, boolean sign) { String s = "Object is "; if (!sign) { s += "not "; } for (int i = 0; i < quant; i++) { s += "very "; } return s + descriptor; } 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?

Answers

Answer 1

The call makeSentence(3, false) will return

"Object is not very very very regular"

The program fragment is:

///////////////////////////////////////////////////////////////////////////////////////////////////////////////

private String descriptor;

public String makeSentence(int quant, boolean sign) {

   String s = "Object is ";

   if (! sign) {

       s += "not ";

    }

   for (int i = 0; i < quant; i++) {

       s += "very ";

   }

   return s + descriptor;

}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////

descriptor is an instance field of the class. When makeSentence(3, false) is called, it does the following;

Initializes a local variable s with "Object is "

s now contains "Object is "

Since sign== false, the if block executes

s now contains "Object is not "

The for loop will execute 3 times to append "very " to s

s now contains "Object is not very very very "

Finally the return statement returns a concatenation of the contents of descriptor (descriptor=="regular") and s

s now contains "Object is not very very very regular"

Learn more about programs here: https://brainly.com/question/19625875


Related Questions

Specifications What are the best practices you should communicate to the Design team about the formatting of the spec book

Answers

The Spec book, describes a formatted writing which contains the major specifications and description of the building blocks of an application or process. The design process should follow formatting guidelines such as ;

Inclusion of table of content, which gives a table like format of the content in the book within the first 25 pages.

Inclusion of the Spec section number in the header and footer section of each page of the book.

Avoid including any other value with the spec section number. Hence, the spec section number must be distinctly seperated.

Learn more : https://brainly.com/question/25648287

it is possible to be logged into a wi-fi network that does not have internet access.

Answers

Answer:

yes it is possible. it'll take some work tho

Explanation:

you would have to bypass the security and disable the proxy and go through the firewall and do some other things to access it

Browser software can be set to update automatically, or require manual intervention. Which is preferred

Answers

A browser, also known as web browser is used to surf the internet.

Automatic and manual updates of the web browsers are based on the user preference

Updating one's browser implies that the user wants to have the latest software experience of the browser, provided by the software developer.

Automatic or manual update of the web browser is usually based on the user preference, and several other factors such as:

Network switches.System vulnerability.Unreliable updatesProvision to revert to a previous update.

The above factors and few others can influence one's decision of software updates.

Read more about software updates at:

https://brainly.com/question/25604919

What is the main purpose of adding captions to an image or table in Word?
O to show the reader where to learn more about the image
O to identify other images that are similar to the one shown
O to add detailed information about the image for the reader
O to provide information on the size and shape of the image

Answers

Answer:

C. to add detailed information about the image for the reader

Explanation:

hope this helps :)

The main purpose of adding captions to an image or table in Word is to provide detailed information about the image for the reader.

Thus, option (c) is correct.

Captions help the reader understand the content of the image, such as its context, significance, or key points, without having to rely solely on the visual information.

Captions also help in referencing the image or table in the text, making it easier for readers to locate and understand the content being discussed in the document.

Therefore, adding captions provide detailed information about the image for the reader.

Thus, option (c) is correct.

Learn more about caption here:

https://brainly.com/question/10413551

#SPJ3

How to turn robot voice like real human voice.

Answers

Go in front of the mirror and act like robot and talk ,there you have a robot voice like real human voice

Civilization V is a game that can be won in a number of ways, including maximizing your civilization's diplomatic, scientific, or cultural standing, making it so the player is intensely focused on winning the game. This is an example of what type of immersion?

Tactical immersion
Strategic Immersion
Non-player immersion
Pseudo immersion

Answers

Answer:

Strategic Immersion

Explanation:

Strategic Immersioninvolves the player being intensely focused on winning the game and weighing all their actions in terms of maximizing their chances

Please HELP

Which of the following is not a method of data management?
A- sorting
b- filtering
c- formula's
d- graphing

Answers

formula's, Data management does not involve formulas.

What is formula?

A formula is a statement that instructs the computer what mathematical operation to carry out on a given value. Formulas are most frequently used in spreadsheet software, like Microsoft Excel, when referring to computer programs.

What is Data Management?

Data management is the process of gathering, storing, and using data in a cost-effective, efficient, and secure manner. In order to make decisions and take actions that will benefit the organization as much as possible, data management aims to assist individuals, organizations, and connected things in optimizing the use of data within the constraints of policy and regulation. An effective data management strategy is more crucial than ever as businesses depend more on intangible assets to generate value.

To know more about Data Management, check out:

https://brainly.com/question/29310787

#SPJ1

You are an IT administrator troubleshooting a Windows-based computer. After a while, you determine that you need to refresh the group policy on that computer. Rather than rebooting the computer, you open a command prompt from which the refresh can manually be completed. Which of the following is the BEST command line tool to run to accomplish this task?a. popdb. fsutilc. gpresultd. gpupdate

Answers

Answer:

gpupdate

Explanation:

My explanation was previously removed.

among the 4 cables ,shielded,unshielded,coaxial,fibre optics,what do you think is the most convenient or most prefer to use.why?

Answers

Answer:

You can use fibre optics

Explanation:

Because it is speed than other wires, it is also cheaper.

Bootmgr starts and reads data from a(n) ________ file that contains information about the various operating systems installed on the system.

Answers

BCD file. Boot Configuration Data (BCD) files provide a store that is used to describe boot applications and boot application settings.

4.2.5 codehs text messages answer

Answers

Answer:

public class TextMessage

{

   private String message;

   private String sender;

   private String receiver;

   

   public TextMessage(String from, String to, String theMessage)

   {

       sender = from;

       receiver = to;

       message = theMessage;

   }

   

   public String toString()

   {

       return sender + " texted " + receiver + ": " + message;

   }

}

The data _____ component of a database management system (DBMS) is used to create and maintain the data dictionary.

Answers

Answer:

IDggK

Explanation:

What is the minimum base of the cloud layer to fly to the top of the towers 4 NM east of Onawa (K36)

Answers

Answer:

792 feet AGL.

Explanation:

Match each Animation category to its description

Answers

Answer:

Your photo is 100% correct

Explanation: protect question from longwinded or poor answers complete.

Motion path: move object on screen. Emphasis: make an object stand out. Entrance: move an object top the frame. Exit: move object out of the frame.

What is animation?

Animation is the process of creating the illusion of motion and change by rapidly displaying a sequence of static images that minimally differ from each other.

The terms commonly used in animation and video production:

The path that an object takes as it moves across the screen is referred to as its motion path. A straight line, a curve, or any other shape or pattern can be used.

The use of animation techniques to draw attention to a specific object or element on the screen is referred to as emphasis. This can be accomplished by utilising colour, size, movement, or other visual effects.

The animation of an object as it enters the screen or frame is referred to as its entrance. This can be accomplished through the use of various techniques such as a slide, a fade-in, or a zoom-in effect.

Exit: the animation of an object leaving the screen or frame. This can be accomplished through the use of various techniques such as a slide, a fade-out, and so on.

Thus, this can be the match for the given scenario.

For more details regarding animation, visit:

https://brainly.com/question/29996953

#SPJ3

Write a program that reads a list of integers, one per line, until an * is read, then outputs those integers in reverse. For simplicity in coding output, follow each integer, including the last one, by a comma. Note: Use a while loop to output the integers. DO NOT use reverse() or reversed(). Ex: If the input is:

Answers

Answer:

I'm just going to copy my pseudocode into an answer:

x = array()

i = 0

while (true)

j = input()

if j = "*" then break

x[i] = j

i++

print x.join(", ")

Explanation:

The program that read a list of integers, one per line, until an * is read, then outputs those integers in reverse can be found in explanation.

What is programming?

Computer programming is the process of carrying out a specific computation, typically by designing and constructing an executable computer program.

Programming tasks include analysis, algorithm generation, algorithm accuracy and resource consumption profiling, and algorithm implementation.

The program that reads a list of integers, one per line, until a * is read, then reverses the output of those integers is:

x = array()

i = 0

while (true)

j = input()

if j = "*" then break

x[i] = j

i++

print x.join(", ")

Thus, it can be concluded that the above mentioned is the program for the given scenario.

For more details regarding programming, visit:

https://brainly.com/question/11023419

#SPJ5

PLEASE HELP! (NO LINKS)

The US Copyright Act gives computer programs the same status as what kinds of work?

Answers

Answer:

C.

Explanation:

In image below.

                                        Have a wonderful day and mark brainliest if I helped,

                                                                   starkitty052010 of Brainly

                                       

A programmer wants to write code that directly accesses the computer’s hardware. Which is the best type of language for the programmer to use?.

Answers

Answer:

Assembly is the programming language that directly accesses the computer’s hardware.

You need to manage a process in the foreground by pressing Ctrl+C on the keyboard. Which signal code is sent to the process?

Answers

The signal code is copy

what is the most common size for footings for an 8 inch foundation​

Answers

Answer:

#4 rods at 12 inches o.c.

Explanation:

What happens as a blog's audience grows?
A. It acquires more insurance.
B. Its influence widens.
O C. Its HTML becomes longer.
O D. It acquires more domain names.

Answers

Answer:

ᴀ. ɪᴛ ᴀᴄǫᴜɪʀᴇs ᴍᴏʀᴇ ɪɴsᴜʀᴀɴᴄᴇ.

Explanation:

Hᴏᴘᴇ Iᴛ's Hᴇʟᴘ

Explanation:

[tex]a \: it \: acquiresmore \insurance[/tex]

A. it's acquires more insurance

Fill in the blank
please help.

_______________________ _____________________ software allows you to prepare documents such as _______________________ and _______________________. It allows you to _______________________, _______________________ and format these documents. You can also _______________________ the documents and retrieved it at a later date.

Answers

Answer:

Application software allows you to prepare documents such as text and graphics. It allows you to manipulate data , manage information and format these documents. You can also store the documents and retrieve it at a later date.

The Sales team uses the /sales directory to store documents related to sales, contacts, and orders. Currently, permissions on the directory only allow the user and group owners to view the contents of the directory. Users who are not part of the group owner are unable to list the contents of the directory.

As part of a new company policy to increase teamwork, you want to allow all users to be able to see the /sales directory and list its contents. You also want to let all users open, but not change, any document inside that directory.

Task:

Allow the other group to browse the /sales directory.

Modify permissions on all files in the /sales directory to allow members of the other group to view but not change the file.
Type:

chmod o+rx /sales

Answers

Answer:

it should be d

Explanation:

please mark this as brainlists i could really use it

File permissions are often set or changed using “Change Mode.” o+ Add permission for “others” with – (remove) r (other possible options include u (user) and g (group)). Permission is read. Implement permission (other possible values include w – write permission)

What is main function of the chmod?

What permission—read (r), write (w), or execute—is third? (x). You would enter chmod o+rx [filename] to add world read and execute permission to a file using symbolic mode. You would type chmod o-r [filename] to make a file world read-only.

— rw-r—r— (644) — Group members and others can only read; only the user has read and write access. — rwx——— (700) — Reading, writing, and executing are all restricted to the user.

Therefore, RWXRXRX (755) — Only the user and the group and others can read and execute; the user has read, write, and execute permissions.

Learn more about chmod here:

https://brainly.com/question/14187643

#SPJ2

Can I get help with making this code and no importing please

Answers

Use code #cam2! For more reassurance o your code

The network or networks within an AS communicate with protocols as well; these are called generically __________.

Answers

The protocol that is used by network or networks within an autonomous system (AS) to communicate with each other is generically called: interior gateway protocol (IGP).

A network refer to a set of interconnected computer systems (nodes) and the relational ties linking the computer systems together, especially for the purpose of exchanging (transmitting) data electronically.

An autonomous system (AS) can be defined as a network or group of networks that are administered or managed by an individual or business firm while using a single set of management rules.

Generally, an autonomous system (AS) typically uses a single (one) Internet Protocol (IP) routing protocol.

In this context, the protocol that is used by network or networks within an autonomous system (AS) to communicate with each other is generically called an interior gateway protocol (IGP).

On the other hand, an exterior gateway protocol (EGP) is the protocol that is used by autonomous systems (AS) to communicate with each other.

Read more: https://brainly.com/question/20629962

Since the advent of online writing, our audience:

A. has grown much larger

B. rarely reads what we write

C. has become disinterested

D. usually comprises one person​

Answers

Answer:

C............. I think

Since the advent of online writing, our audience: A. has grown much larger.

Writing refers to an act (process) of using alphabets and writing symbols to communicate ideas, emotions, and thoughts in a readable form.

On a related note, online writing can be defined as a process that involves writing and making a literary work (piece) solely available for an audience over the internet.

Generally, the audience for online writing has grown much larger, as a result of technological advancement and the availability of communication devices such as:

SmartphonesLaptopsPalmtopse-diaries

In conclusion, our audience has grown much larger since the advent of online writing.

Read more on online writing here: https://brainly.com/question/10354868

five types of conflict in the school​

Answers

Answer:

Conflicts can be classified into five different types: structural, value, relationship, interest, and data [

Explanation:

Answer:

Conflicts can be classified into five different types: structural, value, relationship, interest, and data

Explanation:

follow me please

AI is not embraced everywhere in every industry because _______.

Answers

Answer:

See below:

Explanation:

AI is not embraced in every industry because of the type of industry and what it requires. In some situations, a human is needed since an AI cannot determine what to do and can sometimes even cause death.

AI isn't embraced everywhere because for some things we need a person, lets say for example, we need an AI to respond to 911 calls, that simply won't work due to the many situations and training the bot too will be a nightmare. For example, if a caller says a word that normal humans can understand, or a "code word" that every human knows but they haven't bothered to tell the bot, that will be the end of the line for them.

There are mutliple reasons to not use AI depending on the situation whether its life and death or just plain impractical.

NFPA 780, Standard for the Installation of Lightning Protection Systems provides information on the installation of _____ for lightning protec-tion systems [250.4(A)(1)].

Answers

Answer:

a and b. 250.4(A)(1) Note

Explanation:

The CNSS model of information security evolved from a concept developed by the computer security industry known as the ____________________ triad.

Answers

The CNSS model of information security evolved from a concept developed by the computer security industry known as the CIA triad .

"code is broken down by the computer until it is in _____and is a very long series of ons and offs

binary
code
decode
logic

Answers

Answer:

Binary

Explanation:

Binary is 0 and 1, true and false, on and off. It is the only language machines can understand.

Answer:

I'd say that the answer is Binary because it wouldn't be code, decode, or logic and Binary is the only one that makes sense and i got it correct when i did the exam.

Explanation:

Other Questions
I need help please ASAP!!! WILL GIVE BRAINLIEST AND LOTS OF POINTS . !!Each arrow represents a process that can lead to a rock changing into a different type. Describe the process that will allow a sedimentary rock to become an igneous rock !!. Type your response below please ! HELP IM BEING TIMED: btw its science im just putting some thing randomObserve this image of two objects. What will happen when they are brought close together? Is 100 a reasonable estimate for 915.25 +88.22? Explain. What does the type of animals and plants brought to the New World demonstrate about the needs of Pre-Columbian civilizations Hi! This is a spanish question , please helpp !! Worth 20 points !!! Rationalize the denominator.- 11x^3/Root7x+1 Why is there a mixed historical feeling about Crispus Attucks why should we emphasize Black Friday? tnh cc m men qun tnh chnh trung tm ca tit din, cho bit a = 10cm Which of these elements would have an electron affinity higher than that of oxygen?Li CaNeCBe _____ disorder may result in the avoidance of speaking in public, eating in public, and going to parties. Please type the correct answer in the following input field, and then select the submit answer button or press the enter key when finished. Your answer: Read the excerpt from "Healthy Eating."If anything gets in the way of our good eating, it's lifestyle. When you get home from work late, why spend an hour in front of the stove when you can spend two minutes at the microwave? And doesn't that oatmeal box claim to be a good source of calcium for our kids, never mind the small print listing 14 grams of sugar? A small soda at the movies could satisfy a family of four. Even schools have vending machines.What does the author think is responsible for people's poor eating habits? A They do not know how to correctly read the nutrition information on food packages.B They do not know how to prepare healthy meals that are both inexpensive and quick.C They often choose foods that are quick and convenient instead of ones that are healthy.D They spend time thinking about work and entertainment instead of thinking about food. If someone pretends to be your banking institution in order to convince you to tell them your password information, this is called All thunderstorms that form in the tropics eventually develop into tropical cyclones. Select one: True False What is carbon? What does it do? Yolanda bought 12 pounds of rice for $5 . How many pounds of rice did she get per dollar? Mei is making fruit punch.She makes the fruit punch by mixing fruit juice and lemonade in the ratio 1 : 3.The fruit juice costs 1.80 per litre.The lemonade costs 75p per litre.Work out the total cost of making 16 litres of fruit punch. what is 7 1/2 inches as a decimal of 1 foot Where in Federalist No. 10 states that the federal government should be primarily responsible for addressing environmental concerns? PLEASE LOOK AT THE PHOTO !Number 32 please help me and thank you