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
lyudmila [28]
4 years ago
10

When you ____ a method, you write multiple methods with a shared name but different parameter lists?

Computers and Technology
1 answer:
sergeinik [125]4 years ago
3 0
When you overload a method, you write multiple methods with a shared name with different parameter list.
example c#
 int AddNumbers(int a, int b){
    return a+b;
};

int AddNumbers(double a, double a){
  return Convert.ToInt32(a+b);
}

You might be interested in
It is better to know the main components of all computer programming languages than to memorize the rules for all of the languag
Jlenok [28]

Answer: true

Explanation:

7 0
3 years ago
Read 2 more answers
Define a function dice(n) that returns the sum of a random roll of n 6-sided dice. Example output in photo. Thank you
leonid [27]

Answer:

code (in python) is in the explanation

Explanation:

import random

def dice(n):

   count = 1

   t = list()

   while count <= n:

       i = random.randint(1,6)

       t.append(i)

       count += 1

   print(sum(t))

Hope this helps!

6 0
3 years ago
Write a program that accepts an integer value called multiplier as user input. Create an array of integers with ARRAY_SIZE eleme
Tasya [4]

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

void PrintForward(int myarray[], int size){

   for(int i = 0; i<size;i++){        cout<<myarray[i]<<" ";    }

}

void PrintBackward(int myarray[], int size){

   for(int i = size-1; i>=0;i--){        cout<<myarray[i]<<" ";    }

}

int main(){

   const int ARRAY_SIZE = 12;

   int multiplier;

   cout<<"Multiplier: ";

   cin>>multiplier;

   int myarray [ARRAY_SIZE];

   for(int i = 0; i<ARRAY_SIZE;i++){        myarray[i] = i * multiplier;    }

   PrintForward(myarray,ARRAY_SIZE);

   PrintBackward(myarray,ARRAY_SIZE);

   return 0;}

Explanation:

The PrintForward function begins here

void PrintForward(int myarray[], int size){

This iterates through the array in ascending order and print each array element

<em>    for(int i = 0; i<size;i++){        cout<<myarray[i]<<" ";    }</em>

}

The PrintBackward function begins here

void PrintBackward(int myarray[], int size){

This iterates through the array in descending order and print each array element

<em>    for(int i = size-1; i>=0;i--){        cout<<myarray[i]<<" ";    }</em>

}

The main begins here

int main(){

This declares and initializes the array size

   const int ARRAY_SIZE = 12;

This declares the multiplier as an integer

   int multiplier;

This gets input for the multiplier

   cout<<"Multiplier: ";    cin>>multiplier;

This declares the array

   int myarray [ARRAY_SIZE];

This iterates through the array and populate the array by i * multiplier

<em>    for(int i = 0; i<ARRAY_SIZE;i++){        myarray[i] = i * multiplier;    }</em>

This calls the PrintForward method

   PrintForward(myarray,ARRAY_SIZE);

This calls the PrintBackward method

   PrintBackward(myarray,ARRAY_SIZE);

   return 0;}

6 0
3 years ago
What is the value stored in the variable myNum after the following assignment statement executes? myNum = 23 % 5
netineya [11]

Answer:

% is a modulus operator in most languages, returning the remainder when the preceding number is divided by the following one .  Assuming the language this question pertains to is one of those, then the answer is 3.

7 0
3 years ago
Which telecommunications offering is a component of social media? A.)web conferencing
vichka [17]
I would say C. podcast??? not for sure
7 0
3 years ago
Read 2 more answers
Other questions:
  • Compilers can have a profound impact on the performance of an application. Assume that for a program, compiler A results in a dy
    8·1 answer
  • How to change default search engine in internet explorer 11?
    13·1 answer
  • The network administrator has configured the enterprise firewall to permit port 21 to allow FTP transfers to occur from outside
    8·1 answer
  • Write a c++ function, largestnum, that takes as parameters a double array and its size and returns the index of the last occurre
    14·1 answer
  • There are three main components to economic growth. Which of the following is NOT a component of economic growth?
    7·1 answer
  • Type of file containing instructions that tell your computer how to perform ___
    9·1 answer
  • which scheduling algorithm allocate the CPU firt to the process that request the CPU first, (a) first come first serve,(b) short
    9·1 answer
  • ITEMS
    9·1 answer
  • Write a code snippet Now write your own code snippet that asks the user to enter two numbers of integer type (one at a time) and
    8·1 answer
  • CIS261: Python Programming I home<br> &gt;<br> 6.8: LAB: Miles to track laps
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!