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
Alexxx [7]
3 years ago
14

Write a class named Employee that holds the following data about an employee in attributes: name, ID number, department, and job

title.
Once you have written the class, write a python program that creates 3 Employee objects to hold the following data:
Name: Susan Meyers, ID number: 47899, Department: Accounting, Job Title: Vice President
Name: Mark Jones, ID Number: 39119, Department: IT, Job Title: Programmer
Name: Jon Rogers, ID Number: 81774, Department: Manufacturing, Job Title: Engineer
The prgram should store this data in the 3 objects and then display the data for each employee on the screen.
Computers and Technology
1 answer:
viktelen [127]3 years ago
4 0

firstly we have to create class and then constructors and method

let start with class

class Employee:

   def __init__(self, name, id, department, title):

       self.__name = name

       self.__id = id

       self.__department = department

       self.__title = title

   def set_name(self, name):

       self.__name = name

   def set_id(self, id):

       self.__id = id

   def set_department(self, department):

       self.__department = department

   def set_title(self, title):

       self.__title = title

   def get_name(self):

       return self.__name

   def get_id(self):

return self.__id

   def get_department(self):

       return self.__department

   def get_title(self):

       return self.__title

def __str__(self):

       return 'Name: ' + self.__name + \

              '\nID number: ' + self.__id + \

              '\nDepartment: ' + self.__department + \

              '\nTitle: ' + self.__title

Now to test the program

import emp

def main():

   emp1 = emp.Employee('name', 'id', 'department', 'title')

   emp2 = emp.Employee('name', 'id', 'department', 'title')

   emp3 = emp.Employee('name', 'id', 'department', 'title')

 

   emp1.set_name('Susan Meyers')

   emp1.set_id('47899')

   emp1.set_department('Accounting')

   emp1.set_title('Vice President')

   emp2.set_name('Mark Jones')

   emp2.set_id('39119')

   emp2.set_department('IT')

   emp2.set_title('Programmer')

   emp3.set_name('Joy Rogersr')

   emp3.set_id('81774')

   emp3.set_department('Manufacturing')

   emp3.set_title('Engineer')

   print()

   print(emp1)

   print()

 print(emp2)

   print()

   print(emp3)

main()

You might be interested in
_____ is a system in which a finite set of words can be combined to generate an infinite number of sentences.
Sedbober [7]

Generativity is a system in which a finite set of words can be combined to generate an infinite number of sentences.

<h3>What is a sentence?</h3>

A sentence is a grouping of words, phrases, or clauses that convey meaning to us. An object or a subject can be found in a sentence. These help the person to communicate with one another.

Generativity can be defined as the way to weigh A grammar or a sentence being spoken for. It is defined as a found set of the whole with is defined, usually made with a finite number, to create an infinite number of sentences or words combined.

Learn more about sentences, here:

brainly.com/question/12684453

#SPJ1

8 0
2 years ago
H&amp;R Block's stated purpose is: to be the leading global consumer tax company bringing tax and related solutions to clients y
jok3333 [9.3K]

Answer:

The correct answer is D.

Explanation:

In the given example, the task that the artificial intelligence system has to fulfill is to take control of an irregular task that is performed by humans. This requires a solution that depends on neural networks which work by evaluating given data sets and makes sense of them through the provided algorithms. They eventually come to a conclusion recognizing the relationships between the data points so that the system can decide what action to take. This procedure can be implemented to take control of the tax solution task that is performed by accountants.

I hope this answer helps.

5 0
3 years ago
Nancy malone works for a california-based computer manufacturer. according to nancy, the time required to develop a new product
AleksAgata [21]
I am completely sure that <span>according to Nancy, the time required to develop a new product has decreased because of the increased use of CAM software. CAM (Computer-aided manufacturing) is the application that is needed to enhance manufacturing by linking computer numerical control (CNC) machines to control production process automatically. It improves manufacturing control because it's fully automated.</span>
4 0
4 years ago
Computers are often used to create financial model. One of the features which make a spreadsheet suitable for this is the abilit
Gnesinka [82]

Answer:

Features of spreadsheet software

Rows and columns. Through a spreadsheet's grid system of rows and columns, all of your information is neatly organized in one easy-to-read space.

Formulas and functions. ...

Data filtering and visualization. ...

Custom formatting. ...

Accounting. ...

Analytics. ...

Presentations. ...

Project management

5 0
3 years ago
1. Technician A says you can identify a hybrid vehicle by the badging on the engine cover. Technician B says you can identify a
Liono4ka [1.6K]

Answer:

It's B i did the quiz

and got an 100%

Explanation:

Hope this helps :D

6 0
2 years ago
Other questions:
  • What allows people to create their own radio shows over the internet?
    14·1 answer
  • For window 7 explain the steps you will use to find the available program you will list.
    13·1 answer
  • How can I use internet if data is turned off​
    5·2 answers
  • A program is a high-level one that has been converted to machine language
    15·1 answer
  • For each 8-bit data frame the layer uses a generator polynomial G(x) = x4+x2+ x+1 to add redundant bits. What is the sequence of
    11·1 answer
  • Matlab In this assignment you will write a function that will calculate parallel resistance for up to 10 parallel resistors. Cal
    15·1 answer
  • A website requires their users to create a password for their own account using numbers from 0-5, inclusive, non-repeatedly. The
    7·2 answers
  • Please can somebody help me! i’m really stuck on this question
    9·1 answer
  • I need help solving this problem on Picoctf. The question is What happens if you have a small exponent? There is a twist though,
    7·1 answer
  • In what way can a costume be deleted ?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!