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

The class constructor function must have the same_______ as the class,

Computers and Technology
1 answer:
inn [45]3 years ago
5 0

Answer:

Name.

Explanation:

The constructor in the class must have the same name as the class.Constructors are used to initialize the object when created.There are basically three types of constructors which are as following:-

  1. Default Constructor.
  2. Parameterized Constructor.
  3. Copy Constructor.

Default Constructor:-This constructor is already present in the class when the class is defined.It does not have any arguments.

Parameterized Constructor:-As the name suggests this constructor have parameters that are used to initialize the object.

Copy Constructor:-This constructor is called whenever an object is copying the values of other object.For example:-

There is already an object present with name obj1.

class obj2=obj1;

You might be interested in
Why should information technology NOT be taught in school?​
tatiyna

Explanation:

Technology should not be used to teach in school as it can lead to distractions. With kids wanting to explore other sights, cheating, and communicating with others. Also, it can be expensive to purchase the technology for everyone as it can be a major investment with hundreds or thousands going into it. Technology also requires a lot of training by having to adapt lessons compatible with the systems and making sure the software is secure.

5 0
3 years ago
IF ANYONE ANSWERS YOUR QUESTION WITH SOMETHING LIKE THIS:
vova2212 [387]

Answer:Thank you very much! A user names SShalomeea has been hacking today. Anyone with that photo is a spammer.

4 0
3 years ago
Read 2 more answers
Structure for forloop?
solong [7]

Answer:

for ( initialization; condition;increment)

{

code goes here;

}

in python:

for i in list/range:

code with proper indentation

By initialization above we mean, like int i=0; etc.

By condition like i<10;

and by increment it means like i++, ++i or i+=1; etc

And in python, i can be an integer value if the range is mentioned, and it can be an item of a list if the list is used. We can also use an array, string and various other data structures in python. like we can have characters in a string and so on.

Explanation:

Please check the answer section.

8 0
3 years ago
What is word processors​
otez555 [7]

A word processor is a computer program or device that provides for input, editing, formatting and output of text, often with additional features.

8 0
2 years ago
Write a program that reads numbers from the user until a blank line is entered. Your
ddd [48]

Answer:

nums = []

while True:

   in = input()

   if in:

       nums.append(in)

   else:

       break

if nums:

   avg = sum(nums) / len(nums)

   for i in range(len(nums)):

       if nums[i] == avg:

           print(f"index: {i+1}")

           print(nums[i])

else:

   print(-1)  # if there aren't any values in nums

Explanation:

Assuming that you are coding in Python 3x. The last 'else' statement is an edge case that you might want to consider, I don't know what you want to put there, but I'm just going to leave it as -1.

5 0
2 years ago
Other questions:
  • For some brand-name computers, the hard drive contains a partition that can be used to reinstall windows. what is the name for t
    6·1 answer
  • How can you best protect yourself when using social media
    5·2 answers
  • Write a program that calculates the cost of a phone call. The user enters a positive integer that
    11·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
  • Your marketing director at ABC Marketing Agency would like to set up an email campaign that will use personalization to referenc
    5·1 answer
  • Your friend's job pays $5.00 per hour, and he works 20 hours per week. His tax rate is 20 percent. Assuming he works 50 weeks of
    11·2 answers
  • Need help on Assignment 4: Evens and Odds
    5·1 answer
  • Npesta kenos reaction
    13·2 answers
  • What are the characteristics of the sorting and grouping options in Outlook? Check all that apply. Columns can be sorted by clic
    15·2 answers
  • How did transistors revolutionize the world of computers?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!