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
Mashcka [7]
3 years ago
7

A constructor can be overloaded with more than one function which has the same name but with what two different things

Computers and Technology
1 answer:
andreyandreev [35.5K]3 years ago
5 0
<h2>Answer:</h2>

i. Number of parameters

ii. Type of parameters

<h2>Explanation:</h2>

When there are two or more constructors, definitely with the same name, in a given class, then the constructors are said to be overloaded. An overloaded constructor appears declared many times in a class but each time with different number of parameters and/or type of parameters.

For example, given a class Test, the following combination of constructors can exist;

i. public Test(int x){

   

 }

ii. public Test(String m){

     

  }

iii. public Test(int a, String b){

 

}

<em>The following should be noted;</em>

In the case of combination (i) and (ii), the constructors have the same number of parameters but different type of parameter. In other words, they both have 1 parameter but while the first one has a parameter type of <em>int</em>, the second has a parameter type of <em>String</em>.

In the case of combination (ii) and (iii), the constructors have different number of parameters and of course different type of parameters. In other words, the second constructor has 1 parameter of type <em>String</em> while the third constructor has 2 parameters of types <em>int</em> and <em>String</em>.

You might be interested in
What attracts attention and adds spatial depth to a two-dimensional design.
Harlamova29_29 [7]

Answer:

Hi,

<u>Visual weight</u> attracts attention and adds spatial depth to a two-dimension design.

Explanation:

Visual weight is a measure of the force a piece of art exerts on a viewer/ observer.When a piece of art attracts the eye more, we say the visual weight of that element is higher.Visual weight is measured by observing some features like size, color, position, orientation, shape and texture.

A large art piece will have more visual weight than a small art piece.Warm color such as red has more visual weight more than cool color such as yellow because warm colors tend to occupy the foreground in art pieces.Elements in an art piece that occupy the foreground have more visual weight than those occupying the background.Diminishing the size of an object on the art piece can help you attain spatial depth.

Best of Luck.

6 0
3 years ago
Which of the following is no longer necessary when you use HTML5 to develop Webpages? Please Hurry This Is For An Assignment due
zlopas [31]

Answer:

Installing a third-party plug-in to include video

Explanation:

5 0
3 years ago
For a certain company, the cost function for producing x items is C(x)=50x+100 and the revenue function for selling x items is R
solmaris [256]

Assuming that this company sells all that it produces, the profit function would be given by P(x) = -0.5(x - 100)² + 5,000 - 50x - 100.

<h3>What is profit?</h3>

In Economics, profit can be defined as a measure of the amount of money (revenue) that is generated when the selling price is deducted from the cost price of a good or service, which is usually provided by producers.

This ultimately implies that, all producers generally work to maximize their profits and make them as large as possible, in order to enable them break even and successful.

Mathematically, the profit function P(x) of a business firm simply refers to the revenue function R(x) minus the cost function C(x):

P(x) = R(x) - C(x)

Where:

  • R(x) represents how much it takes in.
  • C(x) represents how much it spends.

Substituting the given parameters into the formula, we have;

P(x) = -0.5(x - 100)² + 5,000 - (50x + 100)

P(x) = -0.5(x - 100)² + 5,000 - 50x - 100

Read more on maximized profit here: brainly.com/question/13800671

#SPJ1

7 0
2 years ago
Whixh options are available when a user modifies a recurring appointment. Check all that apply
Leno4ka [110]

Sorry I don’t know the answer I am really sorry
7 0
3 years ago
Nina is trying to learn more about how computers work. She has repeatedly read that the motherboard is the "brain” of the comput
Lady bird [3.3K]

Its

Processes the data on the computer .

5 0
3 years ago
Read 2 more answers
Other questions:
  • In dt.py, you will implement a basic decision tree classifier for
    5·1 answer
  • Your manager asks you to calculate the sale price if the product is marked down 20 percent. You enter the original price in cell
    9·1 answer
  • You are building a gaming computer and you want to install a dedicated graphics card that has a fast gpu and 1gb of memory onboa
    15·2 answers
  • If you have an equipment failure while driving on an expressway, you should
    8·1 answer
  • Join zoom meet <br>id=547 458 9345<br>pw=sencHURI​
    8·2 answers
  • Why is failure important when you are designing a solution to a problem?
    6·2 answers
  • What are the trinity of the computer system
    10·1 answer
  • What legal protection would cover a person invention?
    10·2 answers
  • What is a circular network.​
    6·2 answers
  • allows users to enter text and control the computer with their voice.allows users to enter text and control the computer with th
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!