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]
3 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]3 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
Is social media bringing people together or cause in sepretation?​
Blizzard [7]

Answer:

IT BRINGS PEOPLE TOGETHERRRR

Explanation:

Ive met so many new people on Discord and I love them more than life its self

5 0
3 years ago
Read 2 more answers
It is a field that contains a unique identifier for each record in a primary table
olchik [2.2K]

Answer: C) Primary key

Explanation:

Primary key is defined as, the set of value which uniquely identifies the row of the table. The value of the primary key are used to referred the entire record as each record has different type of values for key. And each table contain only one primary key. And the primary key cannot contain the null values.

6 0
3 years ago
Do you think we could use mathematical operators on string values rather than integers or floats? Explain.
Blizzard [7]

Answer:

Yes and no. For example, you can do this:

print('hi' * 5)

Output:

hihihihihi

HOWEVER, you cannot do mathematical operations on strings. If I have a string "6" and try dividing it by 3, it's not going to work because... it's not an integer. While multiplying strings does work, you cannot actually do real math with strings unless you change them to int or float

4 0
3 years ago
Some people are unable to arrange six matches to form four equilateral triangles because they fail to consider a three - dimensi
Andre45 [30]

Answer:

a. fixation

Explanation:

Fixation, also called functional fixedness, is one of the most common factors that limit the ability of people to solve a problem. In this cognitive bias, a person is only able to use objects in ways they are normally used. Any attempt to use it in other ways to solve a problem is almost impossible.

Fixation really affects creativity. It limits the way people think. It makes people have a parochial view of the way an object can be used. It blocks the thinking ability from seeing alternative approaches to solving a problem.

3 0
4 years ago
Please help me!! 10 Points are waiting!!
prisoha [69]

Google

https://google.com

Google has a large index of keywords and where those words can be found. Google uses a trademarked algorithm called PageRank, which assigns each Web page a relevancy score.

3 0
3 years ago
Other questions:
  • What’s the answer of Dennis Brylow’s computer science
    15·1 answer
  • Edhesive 3.4 question 2
    11·2 answers
  • In __________ write, the data are stored in the cache, and control returns to the caller. Select one: a. a synchronous b. a buff
    8·1 answer
  • A kerberos __________ is a set of managed nodes that share the same kerberos database.
    10·1 answer
  • Ria and her team ....................... they will win. *
    8·1 answer
  • Choose the word that matches each definition. : processed facts, how the output is used for making decisions : action performed
    12·2 answers
  • You want to use a computer to make a painting of your backyard to go along with a story you wrote. Which software would be appro
    8·1 answer
  • From which latin word the word computer is derived​
    7·1 answer
  • Ergonomics implications of computer​
    12·1 answer
  • Which of the following is true of lossy and lossless compression techniques?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!