Write a class named employee that holds the data of employee

Assignment Help Programming Languages
Reference no: EM131299870

Lab: Classes and Objects

This lab will give you more experience on the use of:

- classes
- class methods

Lab 6: Employee Class [50 points]

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 program that creates three Employee objects to hold the following data:

Name ID Number Department Job Title
Susan Meyers 47899 Accounting Vice President
Mark Jones 39119 IT Programmer
Joy Rogers 81774 Manufacturing Engineer

The program should store this data in the three objects and then display the data for each employee on the screen.

# Fill in this space to construct an Employee class class Employee:

def __init__(self, name, id_number, department, title):
def set_name(self, name):
def set_id_number(self, id_number):
def set_department(self, department):
def set_title(self, title):
def get_name(self):
def get_id_number(self):
def get_department(self):
def get_title(self):
def __str__(self):
def main():

# Fill in this space to create three instances of Employee
print('Employee 1:')
print(emp1)
print()
print('Employee 2:')
print(emp2)
print()
print('Employee 3:')
print(emp3)

# Call the main function.
main()
Here is a sample run:
Employee 1:
Name: Susan Meyers
ID number: 47899
Department: Accounting
Title: Vice President

Employee 2:
Name: Mark Jones
ID number: 39119
Department: IT
Title: Programmer

Employee 3:
Name: Joy Rogers
ID number: 81774
Department: Manufacturing
Title: Engineer

Submission

1. Include the standard program header at the top of your Python file.
2. Submit your files to Etudes under the "Lab 6 " category.

Employee.py

Standard program header

Each programming assignment should have the following header, with italicized text appropriately replaced.

Note: You can copy and paste the comment lines shown here to the top of your assignment each time. You will need to make the appropriate changes for each assignment (assignment number, due date, and description).

Reference no: EM131299870

Questions Cloud

How many shares could she have purchased : Amount of Shares Purchased. If Hope (from problem 1) had invested the same amount of money in a no-load fund with the same price per share, how many shares could she have purchased?
Provide one practical application of series circuits : Provide one practical application of series circuits. In a series circuit, discuss why does the largest R dissipates the most power. Why would it be important to know this?
Demonstrates a favorable irc section 338 : Examine at least one benefit of a Section IRC 338 liquidation election for a target corporation. Create a situation which demonstrates a favorable IRC Section 338 liquidation election for a target corporation.
Define what we mean by money and how it is used in the day : Define what we mean by money and how it is used in the day to day functioning of the U.S. economy. Be sure to include the major components that make up what is defined as money and which of these components is used most widely to identify what mo..
Write a class named employee that holds the data of employee : Write a class named Employee that holds the following data about an employee in attributes: name, ID number, department, and job title.
What is the expense ratio for mark’s mutual fund : Estimating Returns. Hope (from problem 1) later sells her shares in the mutual fund for $37 per share. What would her return be in problems 1 and 2?
Financial statement analysis and valuaation : Given your knowledge of Starbucks key success and risk factors, use the note information presented above to evaluate Starbucks accounting quality.
Fixed line to support data transmission : 1. Can you upgrade your PSTN fixed line to support data transmission? If you can, how would you do it? 2. What is Asynchronous Transfer Mode (ATM)?
Analyze the effects the team''s decisions had on snc working : The executive team of SNC has completed the decision making for capital budgeting for the firm. Summarize the decisions made by each member. Analyze the effects the team's decisions had on SNC's working capital

Reviews

Write a Review

Programming Languages Questions & Answers

  Javascript for metric conversions

Write a javascript that will assist the user with metric conversions. Your program should allow the user to specify the names of the units as strings.

  Write function template to return number of element in queue

Add operation queueCount to class queueType (the array implementation of queues), to return number of elements in the queue. Write down the definition of function template.

  Write function to calculate and print fractional powers

Write down a function which calculates and prints fractional powers of its first argument as shown below for first argument of 2(1/2,1/4,1/8 and so on).

  Your program should read data from a file

Your program should read data from a file which contains one number per line. The total number of lines is not known before execution of the program. The program should detect the end of file to stop reading the data.

  A text string using prompt

A text string, using prompt, either"valid name" or "invalid name",depending on whether the input names fit the required format, which is Last name, first name, middle initial

  Creating code for method tostring

Fill in the code for method toString, which must return a string containing the name, account number, and balance for the account.

  Use one-dimensional array to solve problem

Use one-dimensional array to solve following problem. Read in 10 numbers, each of which is between 10 and 100 inclusive.

  Define a dfa which will give the output various tokens

This problem is designed to show you how DFA and PDA are used in Compilers - Writing a program for PDA - We need to define a DFA which will give the output various tokens.

  Create the calculate and exit buttons on the form

Make sure the application accepts and calculates decimal values

  You need to find out the average score and how many scores

suppose that you have an array of baseball scores type integer called scores. the values in the array are ordered from

  Two stacks of positive integers are needed

Two stacks of positive integers are needed, both containing integers with values less than or equal to 1000. One stack contains even integers; the other contains odd integers. The total number of elements in the combined stacks is never more than ..

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd