1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Dmitriy789 [7]
3 years ago
10

Write a method named square that accepts an integer argument and returns the square of that argument.

Computers and Technology
1 answer:
BaLLatris [955]3 years ago
7 0

Answer:

The method is as follows:

double square(int num){

return num*num;

}

Explanation:

Written in C++

This first line defines the method

double square(int num){

This line returns the square of num

return num*num;

}

<em>I've added the full program as an attachment where I include the main method</em>

Download cpp
You might be interested in
Consider the following method: public double doubleVal(double x) { return x *2; } The following code segment calls the method do
VashaNatasha [74]

Answer:

13.0

Explanation:

The method doubleVal() is created to accept a single parameter of type double.

It multiplies what ever the value of the parameter is and returns the resulting value.

In this question The method is called within this output statement System.out.println(doubleVal(val)); (Note that val had already been declared and assigned the value of 6.5)

The value 6.5 is doubled and outputed to the screen

8 0
3 years ago
The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound.
Sonbull [250]

Answer:

The following alterations are done to the program

1. Replace <em>/* Your solution goes here */ </em>with

<em>const int CENTS_PER_POUND = 25;</em>

<em>cout<<"Ship Weight Pounds: "; </em>

<em>cin>>shipWeightPounds; </em>

<em />

2. Include

<em>shipCostCents = FLAT_FEE_CENTS + CENTS_PER_POUND * shipWeightPounds;</em>

after

<em>cout << ", Cents per lb: " << CENTS_PER_POUND;</em>

Explanation:

<em>See attachment for complete program as it should be ordered</em>

<em></em>

This line declares CENTS_PER_POUND as a constant integer and it also initializes the variable to 25

<em>const int CENTS_PER_POUND = 25;</em>

This prompts the user for the weight of the shipping items (in pounds)

<em>cout<<"Ship Weight Pounds: "; </em>

<em />

This gets user input for  the weight of the shipping item

<em>cin>>shipWeightPounds; </em>

<em />

<em>.............................</em>

<em>........</em>

<em>...</em>

This calculates the cost of shipping the item

<em>shipCostCents = FLAT_FEE_CENTS + CENTS_PER_POUND * shipWeightPounds;</em>

Download cpp
6 0
3 years ago
Explain any one method of creating a presentation.
Arisa [49]

Answer:

Step 1: Analyze your audience

The first step in preparing a presentation is to learn more about the audience to whom you'll be speaking. It's a good idea to obtain some information on the backgrounds, values, and interests of your audience so that you understand what the audience members might expect from your presentation.

Step 2: Select a topic

Next, if possible select a topic that is of interest to the audience and to you. It will be much easier to deliver a presentation that the audience finds relevant, and more enjoyable to research a topic that is of interest to you.

Step 3: Define the objective of the presentation

Once you have selected a topic, write the objective of the presentation in a single concise statement. The objective needs to specify exactly what you want your audience to learn from your presentation. Base the objective and the level of the content on the amount of time you have for the presentation and the background knowledge of the audience. Use this statement to help keep you focused as you research and develop the presentation.

Preparing the Content of Your Presentation

Step 4: Prepare the body of the presentation

After defining the objective of your presentation, determine how much information you can present in the amount of time allowed. Also, use your knowledge about the audience to prepare a presentation with the right level of detail. You don't want to plan a presentation that is too basic or too advanced.

The body of the presentation is where you present your ideas. To present your ideas convincingly, you will need to illustrate and support them. Strategies to help you do this include the following:

Present data and facts

Read quotes from experts

Relate personal experiences

Provide vivid descriptions

And remember, as you plan the body of your presentation it's important to provide variety. Listeners may quickly become bored by lots of facts or they may tire of hearing story after story.

Step 5: Prepare the introduction and conclusion

Once you've prepared the body of the presentation, decide how you will begin and end the talk. Make sure the introduction captures the attention of your audience and the conclusion summarizes and reiterates your important points. In other words, "Tell them what you're going to tell them. Tell them. Then, tell them what you told them."

During the opening of your presentation, it's important to attract the audience's attention and build their interest. If you don't, listeners will turn their attention elsewhere and you'll have a difficult time getting it back. Strategies that you can use include the following:

Make the introduction relevant to the listeners' goals, values, and needs

Ask questions to stimulate thinking

Share a personal experience

Begin with a joke or humorous story

Project a cartoon or colorful visual

Make a stimulating or inspirational statement

Give a unique demonstration

During the opening you want to clearly present your topic and the purpose of your presentation. Clearly articulating the topic and purpose will help the listeners focus on and easily follow your main ideas.

During the conclusion of your presentation, reinforce the main ideas you communicated. Remember that listeners won't remember your entire presentation, only the main ideas. By reinforcing and reviewing the main ideas, you help the audience remember them.

[top of page]

Practicing and Delivering

Step 6: Practice delivering the presentation

Most people spend hours preparing a presentation but very little time practicing it. When you practice your presentation, you can reduce the number of times you utter words and phrases like, "um," "well," and "you know." These habits can easily diminish a speaker's credibility. You can also fine-tune your content to be sure you make your most important points in the time alloted.

In addition to planning the content of your presentation, you need to give advanced thought to how you want to deliver it. Do you want to commit your presentation to memory, use cards to guide you, or read from a script? Or, you might want to use a combination of methods. To help you decide, read the advantages and disadvantages of the four delivery methods described below.

Speaking from Memory

A human brain.

4 0
3 years ago
explain how a computer screen and the eye interact to produce the variety of colors that we see from the 3 colors that are actua
Dima020 [189]

Answer:

Each pixel of light coming from your computer is made up of a combination of Red, Blue and Green light of different intensities. As this pixel of light is so small your eye only "sees" the combination of those 3 pixels as the intended colour. (as opposed to just red, green and blue light) (This is also known as additive colour mixing)

5 0
3 years ago
Which of the following is probably not a place where it is legal to download the music of a popular artist whose CDs are sold in
nignag [31]

Answer:

A. Personal blogs

Explanation:

I did the quick check, and there you go...it's A.

5 0
3 years ago
Other questions:
  • The amount of data produced worldwide is increasing by ___% each year.
    5·1 answer
  • My name Jeff <br><br> what movie is this off of
    6·2 answers
  • In ________ for final fields and methods the value is assignedlater but in ______ you assign the value during declaration.
    15·1 answer
  • Gabriel's sister called him about a message that suddenly appeared on her screen that says her software license has expired and
    11·1 answer
  • Complete the implementation of the following methods:__init__hasNext()next()getFirstToken()getNextToken()nextChar()skipWhiteSpac
    11·1 answer
  • What is the Is option that prints the author of a file​
    7·1 answer
  • Es la actividad que posibilita comunicar gráficamente ideas, hechos y valores procesados y sintetizados en términos de forma y c
    11·1 answer
  • Does anyone know any good new online multiplayer console games that are either out or coming out soon.
    7·1 answer
  • How do most business applications and websites process credit card transactions?
    13·1 answer
  • Which of the following digital communicatio media does not require a connection to the internet
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!