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
The difference between the centerline of a vehicle and the line perpendicular to the rear wheels is called what?
snow_lady [41]
The thrust angle is an imaginary line drawn perpendicular to the rear axle's centerline. It compares the direction that the rear axle is aimed with the centerline of the vehicle. It also confirms if the rear axle is parallel to its front axle and that the wheelbase on both sides of the vehicle is the same.
7 0
3 years ago
In computing the present value of the lease payments, the lessee should a.use both its incremental borrowing rate and the implic
JulijaS [17]

Answer:

The answer is  "Option a"

Explanation:

This payment is equivalent to the regular rent formally specified by the same contract that grants the member the rights for a specified time. It used both the nominal lending rate and the lessor's conditional value,  which provides the lower implied rate, and wrong choices can be described as follows:

  • In option b, It is wrong because in this we assume the implicit rate is lessee.
  • Option c and Option d both were wrong because It doesn't use the Iterative credit rate.

6 0
3 years ago
a) Write out an abstract class to represent a ball. Include data fields to store the weight of the ball as a double value and th
guapka [62]

Answer:

Check the explanation

Explanation:

//Ball.java

public abstract class Ball {

   double value;

   String color;

   public Ball() {

   }

   public Ball(double value, String color) {

       this.value = value;

       this.color = color;

   }

   public abstract void howToPlay();

}

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

//SoccerBall.java

public class SoccerBall extends Ball {

   public void howToPlay() {

       System.out.println("Description to how to play soccer ball");

   }

}

7 0
3 years ago
Read 2 more answers
When attaching a file or files in outlook 365 you select the attach command and then select the files location
mamaluj [8]

Answer:

When you click the attachment button a window pops up allowing you to select the file/s you want to upload

You can also drag and drop file/s this is an alternative method

Explanation:

Microsoft Outlook is a personal information manager software system from Microsoft.

Though primarily an email client, Outlook also includes such functions as calendaring, task managing, contact managing, note-taking, journal logging, and web browsing. Wikipedia

3 0
2 years ago
a. Write a function called fizzbuzz. This function will take 1 number as a parameter. The function will print all numbers from 0
OLga [1]

Answer:

def fizzbuzz (num):

 for item in range(num):

   if item % 2 == 0 and item % 3 == 0:

     print("fizzbuzz")

   elif item % 3 == 0:

     print("buzz")

   elif item % 2 == 0:

     print("fizz")  

   else:

     print (item)

fizzbuzz(20)

Explanation:

Using Python programming Language

Use a for  loop to iterate from 0 up to the number using the range function

Within the for loop use the modulo (%) operator to determine divisibility by 2 and 3 and print the required output

see attached program output screen.

5 0
3 years ago
Other questions:
  • SQL a. has become the de facto standard database language b. can be used to define database systems c. both a. and b. d. none of
    10·1 answer
  • How do you determine latitude using an astrolabe?
    11·1 answer
  • What do you believe are the motives of a cyber criminal? Why?
    15·1 answer
  • The ability of services to grow or shrink based on need is called __________.
    14·1 answer
  • Why are specification for food processing tool,equipmentand untensils necessary?​
    8·1 answer
  • What is computer ? What is computer program? What is hard disk.
    12·2 answers
  • A=3<br> b = 2<br> print (a ** b)<br> What is output?
    13·2 answers
  • What are the characteristics of a good text-based adventure game? In other words, what are some features that should be in the g
    7·1 answer
  • Convert pounds to ounces.
    11·2 answers
  • 3. The following is a dump of a UDP header in hexadecimal format. 0045DF000058FE20 a. What is the source port number? b. What is
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!