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
7.4 Lesson Practice (projectstem): what is output if the user is enters 2?​
Hatshy [7]

Answer:

18

Explanation:

lets go step by step.

the function called tryIt has a value, a variable named "a". this "a" variable will be whatever the user enters when the program says, Enter a number.

ok so if we enter "a" as 2, and b in the function will always be 7, and 2 + 7 equals 9,

and the ans variable (short for answer) will take the result of the function (9) and multiply it by 2,

then the answer is 18

3 0
3 years ago
Four differences between fourth and fifth generation of computers​
Juliette [100K]

Answer:

 The following are the four difference between the fourth and the fifth generation of the computer that are:

  • The fourth generation computer technology is basically based of the microprocessor. On the other hand, the fifth generation computer is based upon the artificial intelligence technology.  
  • The fourth generation computer system are faster in computation. Whereas, the fifth generation computer are more reliable and faster in speed as compared to all other generations.
  • The fifth generation computer are small in the size and more potable as compared to the fourth generation computer system.
  • Laptop, notebook and Chromebook are some of the example of fifth generation. Whereas, STAR 100 and IBM 4341 are the example of fourth generation.
7 0
3 years ago
In Microsoft Word you can access the _______ command from the "Mini toolbar". A. insert citation B. save as C. underline D. word
tresset_1 [31]
Save as is the command that you would use to save anything when using microsoft
4 0
3 years ago
Read 2 more answers
Software on your computer is taking a long time to load. What could help solve this problem?
Andrei [34K]

Answer: close the program and reopen it.

Explanation: This is one of the 5 common problems in a computer.  When a program wont load, Try closing and reopening the program.

Reboot the computer.

Check for known issues on the web or updates to the software.

Use Task Manager (Ctrl+Alt+DEL) if program is non-responsive to "end task."

4 0
3 years ago
What is a method whereby new problems are solved based on the solutions from similar cases solved in the past?
mario62 [17]

Answer:

"Case-Based Reasoning" is the answer for the above question.

Explanation:

  • Case-Based Reasoning is a process of decision-making theory in which the new problems were solved based on the previously solved problem.
  • It is used in artificial intelligence and robots. This helps to make any AI and robots to do the work and take decisions on its own.
  • The theory is used to make any computer that behaves like humans. It can take decisions like a human.
  • The above question asked about the method by which the new problem is solved on behalf of the old problem. Hence the answer is "Case-Based Reasoning".
4 0
3 years ago
Other questions:
  • What are the desirable qualities of a Product Vision?
    11·1 answer
  • ​For complex models, analysts can choose computer-based modeling tools that use _____, which includes standard shapes and symbol
    10·1 answer
  • What connector has 4 pins, is used for older IDE drives and some SATA drives, and can provide +5 V and +12 V power outputs?
    11·1 answer
  • Need help with just #8
    12·1 answer
  • what is the total resistance of a series circuit with four resistors in series of 12 16 20 and 24 ohms​
    14·1 answer
  • Spencer wants to choose a career path that wouldn’t hold him to an office or laboratory. Which of the following career paths wou
    13·2 answers
  • An ip address in the address range 169.254.x.y, used by a computer when it cannot successfully lease an ip address from a dhcp s
    6·1 answer
  • In which of the following stages of the development process is a team MOST likely to interview a potential user of an app?
    6·1 answer
  • Simple interest will always pay more interest than compound interest.
    14·1 answer
  • Question 1 Which portion of the PuTTY package allows you to perform file transfers using the SCP (Secure Copy) protocol?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!