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
Elis [28]
3 years ago
15

class secretType { public: static int count; static int z; secretType(); secretType(int a); void print(); static void incrementY

(); private: int x; static int y; }; secretType::secretType() { x = 1; } secretType::secretType(int a) { x = a; } void secretType::print() { cout << "x = " << x << ", y = " << y << "z = " << z << ", count = " << count << endl; } static void secretType::incrementY() { y++; } Consider the accompanying class and member functions definitions. How many constructors are present in the class definition?
Computers and Technology
1 answer:
DanielleElmas [232]3 years ago
5 0

Answer:

The answer to this question can be given as:

In this class definition, there are two constructors.  

Explanation:

In the class definition two constructors are different in type but first we explain constructor that can be as:

Constructor: constructor are special member functions whose task is to initialized as an object of its class.

Rule for defining constructor:

A constructor doesn’t have a return type not even void.

The name of the constructor must be the same as the class name.

A constructor is called automatically when a new instance of an object is created.

Type of constructor:

  1. default constructor.
  2. parameterized constructor.
  3. copy constructor.

In the question there are two type of constructor is used that can be given as:

default constructor:  

The constructor without any parameters is called a default constructor. This type of constructor is called automatically when a new instance of an object is created.

parametrized constructor:

In the parameterized constructor we use at least one parameter in the constructor that is called the parameterized constructor. In the parameterized constructor we can initialize each instance of the class with several values.

Example :

class AB   //define class  

{  

   String name; //define variable

   AB()   //default constructor

   {

   System.out.print("hello...");  //message.

   }

   AB(String name)  //parametrized constructor.

   {  

       this.name = name;  //holding value in name variable.

   }  

}  

class Main  //define class

{  

   public static void main (String[] args)  //main method  

   {  

   AB OB1 =new AB();   //creating class object.

   AB ob2=new AB("XYZ");

   System.out.print(ob2.name);  //print value

   }  

}

Output:

hello... XYZ

You might be interested in
Why is charles babbage known as father of computer?​
swat32

Answer:

Because he is the man who found the concept on input process and output theory.

Explanation:

check this website and follow their courses https://www.eacademy.lk/2019/06/internet-and-www-course.html

It's Free

3 0
3 years ago
Drag the correct type of update to its definition.
Sophie [7]

Answer:

  • PRI

The connection between a mobile device and radio tower.

  • Baseband

The chip that control the radio frequency waves within a device.

  • PRL

A list of radio frequencies.

Baseband can be defined as a  technology within the the mobile devices that creates and manages interface to wireless network such as radio transmitters and the radio receivers.

Primary Rate Interference PRI on the other hand is a connection that is configured by many countries. This configuration has specified data and control channels with specified speed for specified countries depending upon the T-carriers and E-carriers.

3 0
3 years ago
Write a method that will receive 2 numbers as parameters and will return a string containing the pattern based on those two numb
Kipish [7]

Answer:

The purpose of the Java compiler is to translate source code into instructions  public static void main(String[] args)  Arity is the number of arguments passed to a constructor or method or the number ... and objects, which are the focus of object-based programs.  Remove the 2 from between the square brackets to make.

Explanation:

5 0
3 years ago
Josephine is in the process of creating ads within her Standard Display campaign. She finds that there are two main ad formats t
Dennis_Churaev [7]

Answer:

d.Responsive Display ads

e.Uploaded ads (Image & AMPHTML)

Explanation:

The two main ad formats used in a Standard Display campaign are;

1. Responsive Display ads: they are Google's new default ad format and are automatically created by Google using assets provided by users in a square and landscape format.

2. Uploaded ads (Image & AMPHTML): they are created using a tool like Google Web Designer to create adverts outside of Google Ads.

They can be uploaded as a jpeg, gif, zip file and png extension into Google Ads.

3 0
3 years ago
What will be the biased exponent of 1,100.1? <br> A:130<br> B:127<br> C:-127<br> D:2^3
telo118 [61]
D. 2^3 is correct

hope this helps

7 0
4 years ago
Read 2 more answers
Other questions:
  • On sites that use "cloud computing," how is your information being stored?
    13·1 answer
  • A server that provides data transfer and storage space at remote locations is called a
    7·1 answer
  • The domain name service (dns is a distributed database that allows users to communicate with each other computers by:
    7·1 answer
  • An administrator has created a new custom object in a sandbox environment and now is ready to deploy in production. How can the
    11·1 answer
  • How do you increase the number of tries by one?
    10·1 answer
  • PLZZZZZZZZZZ HELP ME OUT THIS DUE TODAY AND NEED SOMEONE HELP!!!!!plzzzzzzzzzzz i begging you!!!
    11·1 answer
  • Please help with this coding question
    8·2 answers
  • PLEASE HELP! :)
    14·1 answer
  • What are the routes through with Virus transmitted into computer<br>system?​
    15·1 answer
  • Difference between Data and information​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!