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 new table named fictioncopies

Create a new table named FictionCopies using the data in the BookCode, Title, BranchNum, CopyNum, Quality, and Price columns for those books that have the type FIC.

  Describe outer joins in databases

USe an outer join. You must include the condition on OrderDate in the ON clause of the outer join.

  1 a table scan is reading every record from the table in a

1. a table scan is reading every record from the table in a sequential order to find the data that a query is looking

  Good example of sql query

Explain what is bad about the poor example

  Can we offer an example of a query

Can we offer an example of a Query in which we can use a parentheses to affect the order of execution in which the WHERE Clause has both AND and OR Logical Operators?

  Convert requirement to logic and then to sql

Prepare the SQL query for each of given requirements. Convert requirement to logic, then to SQL. Illustrate the names of all products which have been sold.

  Consultant to assist in streamlining the data processing

Imagine that you have been hired as a consultant to assist in streamlining the data processing of an international based organization that sells high-end electronics.

  Identify the attributes of the entities

Identify the various entities and their attributes involved in the application and identify the attributes of the entities that are unique to each entity.

  Possible advantages of utilizing pl-sql

A good IT professional is able to be versatile in SQL programming styles. Identify at least two possible advantages of utilizing PL/SQL instead of standard SQL Syntax.

  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.

  Correlated sub-query to return one row per customer

Use a correlated sub-query to return one row per customer, representing the customer's oldest order (the one with the earliest date).

  Write a sql query that returns the names of the students

Write a SQL query that returns the names of the students (lname, fname), and the major of the major with most students. If more than one major is tied for most students, then list all the names of the students from both majors (as well as the major..

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