Additional attributes department and datehired

Assignment Help PL-SQL Programming
Reference no: EM131049739

Write a class called Person that has the attributes name, address, date of birth and cell phone number.  This class should also include the following methods:

__init__ to initialize all attributes

Mutators for all attributes

Accessors for all attributes

__str__ to display the attributes in the following format:

Name: the name of the person

Address: the address of the person

Date of Birth: in the format mm/dd/yyyy

Cell Phone Number: the cell phone number of the person

Now, write a class called Employee that inherits from the Person class.  This class should have the additional attributes Department and DateHired.  Be sure to include Accessor and Mutator methods as well as __init__ and __str__.

Write two more classes, Commission and Hourly, that both inherit from Employee.  The Commission class has two attributes, baseSalary and commissionRate.  Be sure to include appropriate methods.  Also include a method to calculate the total salary.  Total salary is the base salary plus the commission earned (commissionRate times an input total sales amount).

The Hourly class should have 2 attributes, rateOfPay and hoursWorked.  Be sure to include appropriate methods.  Also include a method to calculate total salary.

Now write a main program that reads in employee data from a file.  The file format is

Type of Employee - C for Commission and H for Hourly

Name

Address

Date of Birth

Cell Phone Number

Department

Date Hired

Base Salary (if commission) or Rate of Pay (if hourly)

Commission Rate (if commission) or hoursWorked (if hourly)

The file is comma delimited.  The file is located in the I:\kopp\outbox\CS 121 02\Program Assignments folder.  The file name is payroll.txt.

The program should print a report with the following information:

Name

Address

Date of Birth

Cell Phone Number

Department

Date Hired

Pay for this pay period

Be sure to use __str__ methods in each class so that you can print the object and get the correct output format.

YOU ARE REQUIRED TO WORK ON THIS BY YOURSELF.  BE SURE TO DO YOUR OWN WORK.  IF YOU WORK TOGETHER, ALL PARTIES WILL GET A 0.

You are required to use appropriate functions.  Design will be included in grading.

Add the following comments to the beginning of the program.

Name:                                  Your Name

Class and Section:            CS 121 02

Assignment:                       Program Assignment 05

Due Date:                            See above

Date Turned in:

Program Description:     You write a short description of what the program will do

When you complete the program, do the following.

1. Turn in a printout of the source code for both programs

2. Create a folder with the following name: Program 05

Reference no: EM131049739

Questions Cloud

Problems in a project : 1. First read and analyze each problem; then implement both problems in a project called HW3. 2. For each exercise, insert comments on ID, Name, and HW#.
What is missing from current studies : What do researchers agree or disagree about? What are the central themes and arguments in current studies? What is missing from current studies?
Making semiannual interest payments : What is the value of a 20-year, noncallable bond with an annual coupon rate of 9.5%, but making semiannual interest payments? The bond has a face value of $1,000, and you require an annual 8.4% discount rate for this investment.
Show that the coefficients of the cosine terms are all zero : The Fourier sine series is especially convenient for discussing functions that are zero at the end points x = 0 and L.
Additional attributes department and datehired : Now, write a class called Employee that inherits from the Person class.  This class should have the additional attributes Department and DateHired.  Be sure to include Accessor and Mutator methods as well as __init__ and __str__.
Purposes of the project portfolio process : Which of the many purposes of the project portfolio process are most important to a firm with a low project management maturity? Which to a firm with high maturity?
Considered claims against companys future cash flows : Many businesses find it generally more efficient to enlist the services of a financial institution when it comes time to raise capital: IE. Investment Banks: An organization that underwrites and distributes new investment securities and helps busines..
Animate your plots and describe the motion : Take the wave speed on the string to be c = 1. (a) Sketch this initial shape and find the coefficients Bn, in its Fourier sine series (16.31). (b) Make plots of the sum of the first several terms for several closely spaced times between t = 0 and ..
Security and privacy issues in internet of things : You are required to prepare and submit a report on your topic to address the following questions (the length of the report within 1500~2000 words, excluding references):

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

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