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
yulyashka [42]
2 years ago
10

Given a member function named set_age() with a parameter named age in a class named Employee, what code would you use within the

function to set the value of the corresponding data member if the data member has the same name as the parameter
Computers and Technology
1 answer:
BaLLatris [955]2 years ago
6 0

Answer:

Explanation:

This would be considered a setter method. In most languages the parameter of the setter method is the same as the variable that we are passing the value to. Therefore, within the function you need to call the instance variable and make it equal to the parameter being passed. It seems that from the function name this is being written in python. Therefore, the following python code will show you an example of the Employee class and the set_age() method.

class Employee:

   age = 0

   

   def __init__(self):

       pass

   

   def set_age(self, age):

       self.age = age

As you can see in the above code the instance age variable is targeted using the self keyword in Python and is passed the parameter age to the instance variable.        

You might be interested in
Which sign or symbol will you use to lock cells for absolute cell reference?
ivanzaharov [21]
It's asterisk hope this helped
7 0
3 years ago
Read 2 more answers
Which of these converts analog audio signals into digital codes in a computer?
DaniilM [7]
It would either be A. Audio card or D. Sound card but most likely A
6 0
3 years ago
Read 2 more answers
Which is an example of a variable name written in camelcase?
NemiM [27]

Answer:

Option (a) myCar

Explanation:

Option (a) is Correct

If there are two or more words in variable we can use camel case to declare the variable. In camel case first character of first word is either a lowercase alphabet or underscore (_) and first character of second word is a uppercase alphabet. ex: empNum, myCar

So the Option (a) myCar is correct among the given options

Option (b) is incorrect

Since both the first letter of two words are in lower case which is not according to camel case rules

Option (c) is incorrect

The first letter of first word is in lower case first character of second word is a uppercase alphabet but there is a gap so it is not valid .

Option (d) is incorrect

The first word is in upper case and first character of second word is a uppercase alphabet it is not valid.

6 0
3 years ago
Read 2 more answers
What
AveGali [126]
Answer: Computers and cellular devices
Reason: Everyone every day watched entertainment with commercials of the internet all day on these technologies and proven by 92 percent. Make this brainly answer for everyone else that needs this. Hope this helps:)
8 0
2 years ago
Human services organizations seek to make changes and help people in need to improve their .
bixtya [17]

Answer:

quality of life

Explanation:

7 0
3 years ago
Other questions:
  • Select the proper ergonomic keyboarding techniques.
    15·2 answers
  • You can use ???? a to test tread wear on your tires
    14·2 answers
  • What types of storage can be used to access your data on another computer?
    6·2 answers
  • While doing online research you enter this keyword search with a truncation character: man* Which of the following would not be
    15·1 answer
  • The main circuit board of a computer is the _______. The ______ is located on the circuit board. The _____ is the circuitry that
    14·1 answer
  • Create a stored procedure sp_Q1 that takes two country names like 'Japan' or 'USA'as two inputs and returns two independent sets
    10·1 answer
  • Nathan wants to create multiple worksheet containing common formatting styles for his team members. Which file extension helps h
    9·1 answer
  • What is the difference between RELIABLE and UNRELIABLE sources of<br> income?
    7·2 answers
  • ________ is the general name for a security flaw in a program. Group of answer choices A security fault A virus Malware A vulner
    13·1 answer
  • Is it true that if the user log out the computer will turn off automatically​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!