For Online Class Help or Private Tutoring Service email us at [email protected] or WhatsApp us at +1 (781) 656-7669

Homework Provider

 
  • Take My Class
  • Take My Exam
  • How It Works
  • Solutions
    • Questions
  • Testimonials
  • Blog
  • Who Are We
  • Contact Us
  • Take My Class
  • Take My Exam
  • How It Works
  • Solutions
    • Questions
  • Testimonials
  • Blog
  • Who Are We
  • Contact Us
  1. Home
  2. Questions
  3. DeVry CIS 247A Week 5 iLab Composition Inheritance and Polymorphism

Contents

  • 1 DeVry CIS 247A Week 5 iLab Composition Inheritance and Polymorphism
    • 1.1 Deliverables
    • 1.2 Due this week:
    • 1.3 iLAB STEPS
  • 2 STATUS
  • 3 STATUS

DeVry CIS 247A Week 5 iLab Composition Inheritance and Polymorphism

Scenario and Summary
The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes:

  1. Create a derived class called Salaried that is derived from Employee.
  2. Create a derived class called Hourly that is derived from Employee.
  3. Create generalized input methods that accept any type of Employee or derived Employee object
  4. Create generalized output methods that accept any type of Employee or derived Employee object
  5. Override the base class CalculatePay method
  6. Override one of the base class CalculateWeeklyPay methods

Deliverables

Due this week:

Before you post your lab in the dropbox, copy your entire program into a Notepad file and post that. I do not need you to zip the project or give me screenshots of the output.

iLAB STEPS

STEP 1: Understand the UML Diagram
Analyze and understand the object UML diagram, which models the structure of the program:

  • There are two new Employee derived classes (1) Salaried and (2) Hourly that are derived from the Employee class.
  • The Employee class contains a new attribute employee type and a new constructor that accepts as an argument the assigned employee type.
  • Both the Salaried and the Hourly classes override only the CalculateWeeklyPay method of the Employee class (note, this is the method without any parameters.)
  • The Salaried class has one attribute “managementLevel” that has possible values from MIN_MANAGEMENT_LEVEL to MAX_MANAGEMENT_LEVEL and a BONUS_PERCENT.
  • The Salaried class has a default constructor and parameterized constructor that accepts all the general employee information plus the management level.
  • The Hourly has a wage attribute, which respresents the hourly wage that ranges from MIN_WAGE to MAX_WAGE, a hours attributes, which represents the number of hours worked in a week that ranges from MIN_HOURS to MAX_Hours, and a category attributes that accepts string values.
  • The Hourly class has a default constructor and parameterized constructor that accepts all the general employee information plus the hours and wage value.
  • The Presentation Tier contains two new classes (1) The EmployeeInput class and the EmployeeOutput class
    The EmployeeInput class contains three static methods:
  • CollectEmployeeInformation, which accepts any type of Employee object as a argument.
    CollectHourlyInformation, which accepts only Hourly objects as an argument.
    CollectSalariedInformation, which accepts only Salaried objects as an argument.
  • The EmployeeOutput class contains two methods
    DisplayEmployeeInformation, which accepts any Employee type as an argument.
    DisplayNumberObjects method.
  • All the access specifers for the Employee attributes are changed to protected and are depicted with the “#” symbol.
take-my-online-class-thumbnail
Play Video
pay-someone-to-take-my-online-class

Name: Jennifer Lucas
Status: Online ⬤
Classes Taken: 3878
Ratings: ⭐⭐⭐⭐⭐

Hire Me

STATUS

 

STEP 2: Create the Project

  • You will want to use the Week 4 project as the starting point for the lab. Use the directions from the previous week’s labs to create the project and the folders.
  • Create a new project named “CIS247_WK5_Lab_LASTNAME”. An empty project will then be created.
  • Delete the default Program.cs file that is created.
  • Add the Logic Tier, Presentation Tier, and Utilities folders to your project
  • Add the Week 4 project files to the appropriate folders.
  • Update the program information in the ApplicationUtilities.DisplayApplicationInformation method to reflect your name, current lab, and program description

Note: as an alternative, you can open up the Week 4 project and make modifications to the existing project. Remember, there is a copy of your project in the zip file you submitted for grading.
Before attempting this week’s steps ensure that the Week 4 project is error-free.

STEP 3: Modify the Employee Class

  • Change the access specifier for all the private attributes to protected.
  • Add the new attribute employee type, along with a “read-only” property (that is only a “get” method) to access the employee type value.
  • Add a new constructor that only accepts the type attribute, which is then used to set the employee type value.
  • Also, this constructor should initialize all the default values. You can call the default constructor using the syntax:
  1. public Employee(string employeeType) : this() { }
  • Modify the parameterized constructor that accepts the employee information to accept the employee type, and then set the employeeType with this value.
  • Modify the ToString Method to include the employee type.

STEP 4: Create the Salaried Class

  • Using the UML Diagrams, create the Salaried class, ensuring to specify that the Salary class inherits from the Employee class.
  • For each of the constructors listed in the Salaried class ensure to invoke the appropriate superclass constructor and pass the correct arguments to the superclass constructor.
  • Override the CalculateWeeklyPay method to add a 10 percent bonus to the annualSalary depending on the management level. The bonus percent is a fixed 10 percent and should be implemented as a constant. However, depending on the management level the actual bonus percentage fluctuates
  1. (i.e., actualBonusPercentage = managementLevel * BONUS_PERCENT).
  • Override the ToString method to add the management level to the employee information.

STEP 5: Create the Hourly Class

  • Using the UML Diagrams, create the Hourly classes, ensuring to specify that the Hourly class inherits from the Employee class.
  • For each of the constructors listed in the Hourly class ensure to invoke the appropriate superclass constructor and pass the correct arguments to the superclass constructor. Notice, that the Hourly employee DOES NOT have an annual salary, which we will then have to calculate (see below).
  • Create a Category property (get/set) and the valid category types are “temporary”, “part-time”, “full time”.
  • Create an Hours property (get/set) for the hours’ attributes and validate the input using the constants shown in the UML diagram, but since an Hourly employee does not have a formal annual salary we will need to calculate this each time the hour (and wage) properties are set. Add the following code after the validation code in the hour’s property:
  1. base.AnnualSalary = CalculateWeeklyPay() * 48; (assumes working 48 weeks a year).
  • Create an Wage property (get/set) for the wage attributes and validate the input using the constants shown in the UML diagram. Add the following code after the validation code in the wage property:
  1. base.AnnualSalary = CalculateWeeklyPay() * 48; (assumes working 48 weeks a year)
  • Override the CalculateWeeklyPay method by multiplying the wages by the number of hours. 7. Update the ToString method to add the category, hours, and wages to the hourly employee information.
take-my-online-class-thumbnail
Play Video
pay-someone-to-take-my-online-class

Name: Jennifer Lucas
Status: Online ⬤
Classes Taken: 3878
Ratings: ⭐⭐⭐⭐⭐

Hire Me

STATUS

 

STEP 6: Create the EmployeeInput Class

  • Create a new class in the Presentation Tier folder called “EmployeeInput”
  • Create a static void method called CollectEmployeeInformation that has a single Employee parameter. The declaration should look something like the following:
  1. public static void CollectEmployeeInformation(Employee theEmployee)
  • Write code statements similar to what you created in the Week 4 project to collect the generic employee information from the user, except instead of using specific employee objects use the “the employee” parameters. For example:
    In Week 4, you had something like:
  1. employee1.FirstName = InputUtilities.GetStringInputValue(“First name”);

In the CollectionEmployeeInformation method this can be translated to the following;

  1. theEmployee.FirstName = InputUtilities.GetStringInputValue(“First name”);
  • Write statements to collect all the generic employee information, including the Benefits information, as you did in the Week 4 project. However, since not all derived types have a AnnualSalary value, DO NOT collect the annual salary data.
  • Create a new static void method called CollectEmployeeInformation that accepts an Hourly employee object.
  • Using the InputUtilities methods write statements to collect the wage and hours from the user.
  • Create a new static void method called CollectSalariedInformation that accepts a Salaried employee object.
  • Using the InputUtilties methods write statements to collect the management level and the annual salary.

STEP 7: Create the Main Program

  • Create an array of type Employee that will hold three employee objects. Create three new objects, one Employee, one Hourly and one Salaried in positions 0, 1 and 2 of the array respectively. Make sure to use the constructors the accept the employee type and provide appropriate values for the employee type (e.g. “Generic”, “Hourly”, “Salaried”).
  • Using a FOR loop iterate through the array and collect all the generic employee information, using the EmployeeInput.CollectEmployeeInformation method.
  • If the current item in the array is an Hourly object, then use the EmployeeInput.CollectHourlyInformation method to collect the hourly information.
  • If the current item in the array is a Salaried object, then use the EmployeeInput.CollectSalariedInformation method to collect the salaried information. Use the following if statement to determine the specific type of object:
  1. if (employeeList[i] is Hourly)
  2. EmployeeInput.CollectHourlyInformation((Hourly)employeeList[i]);
  3. else if (employeeList[i] is Salaried)
  4. EmployeeInput.CollectSalariedInformation((Salaried)employeeList[i]);
  • After the information has been collected display the employee information using the EmployeeOutput.DisplayEmployeeInformation method.
  • Before terminating the program display the number of employee objects that have been created.

STEP 8: Compile and Test

  1. When done, compile and run your program.
  2. Then debug any errors until your code is error-free.
  3. Check your output to ensure that you have the desired output and modify your code as necessary and rebuild it.
Facebook
Twitter
Reddit
Pinterest
WhatsApp
Email
pdf-answers
Get Solved Answers
$2.99
Add to cart

GET QUICK PRICE ESTIMATE FOR THIS TASK

WHY CHOOSE US

  • Over 300 Experts to Work on Your Papers
  • 100% Privacy and Confidentiality
  • Amazing Discounts and Special Offers
  • Delivery within Every Deadline Level
  • Secure Payment Process
  • High-Quality Papers
  • 24/7 Live Customer Support
  • Free Revisions If Required
  • Fair & Cheap Prices
  • Rated 4.9/5 By Students

COMPLETED TASKS

SOCS 325 Week 8 Final Exam (Version 2)

July 13, 2020

SOCS 325 Week 8 Final Exam (Version 1)

July 13, 2020

SOCS 325 Week 8 Final Exam (Collection)

July 13, 2020

SOCS 325 Week 8 Collaborative Group Project Discussion

July 13, 2020

SOCS 325 Week 7 Bundle: Assignments + Group Project + Discussions

July 13, 2020

SOCS 325 Week 6 Bundle: Assignments + Discussions

July 13, 2020

SOCS 325 Week 5 Bundle: Assignments + Discussions

July 13, 2020

SOCS 325 Week 4 Midterm (Version 4)

July 13, 2020

Homework Provider

Facebook-f Twitter Pinterest Whatsapp Reddit Envelope

WE ACCEPT

PayPal
VISA Light
AMERICAN EXPRESS LIGHT
Bitcoin
  • Take My Online Class
  • Do My Case Study
  • Take My Online Exam
  • Online Class Help
  • Do My Homework
  • Take My Online Test
  • Original Homework Help
  • Premium Plagiarism Checker
  • Take My Midterm Exam
  • Research Paper Writing
  • Case Study Writing Help
  • Dissertation Writing Service
  • Online Coursework Help
  • Pay Someone To Write My Paper
  • Pay For Online Classes
  • Programming Classes Help
  • MyMathLab Answers
  • MyStatLab Answers
  • MyAccountingLab Answers
  • Need Help With Online Class
  • Cheap Assignment Help
  • Write My Online Essay
  • Online Student Problems
  • Math Homework Help

Contact Us

  • [email protected]
  • WhatsApp (781) 656-7669
  • twitter.com/hwp_helper
  • fb.com/homeworkprovidercom
  • Privacy Policy
  • Terms of Use
  • DMCA
  • Cookie Policy
  • Money Back Guarantee
  • Premium Plagiarism Checker
  • Contact Us

HomeworkProvider.com is not endorsed or affiliated by any university or college. The services provided are meant to assist the client by providing a guideline and the product provided is intended to be used for research or study purposes.

© 2013-2020 HomeworkProvider. All rights reserved.

ORDER THIS
WHATSAPP

Yay! You are just one step away to get rid of homework stress

  • How It Works
  • Testimonials
  • We are committed to ensuring that your information is secure with us
hire-an-expert-to-do-my-exam

Don't Waste Your Time Searching For Old Plagiarized Courses

Get Your Job Done By Our Anonymous Quality Experts

  • How It Works
  • Reviews
  • 24/7 Support
doc icon homework provider

CIS 155 Lab Help, Leslie​
Thank you for doing my CIS 115 lab. Homework Provider is the best.

Rated By Client
 5/5
doc icon homework provider

Dream Service, William
Thanks God, you came to my rescue. Thanks for your help.

Rated By Client
 5/5
doc icon homework provider

Mind blowing service, Eddie
I could have failed quite a few exams if you guys did not help me

Rated By Client
 5/5
doc icon homework provider

Got A grade in final exam, John
I still couldn’t believe I got an A grade in my exam. Highly vouched service.

Rated By Client
 5/5
doc icon homework provider

Linda, opted for private tutoring
Subscribed to get online class help for devry acct 212 week 1-8 class​​

Week 5 65%
doc icon homework provider

Acct Course Project, Ryan
Thanks a lot to my writer who followed all my requirements.

Rated By Client
 5/5
xls-icon

Genuine service, Steven
The research paper was much more than I expected! Thanks a lot.

Rated By Client
 4.5/5
doc icon homework provider

Karen, opted for private tutoring
Subscribed to get online class help for liberty BUSI 536 week 1-8 class.

Week 7 88%
doc icon homework provider

Marcus, opted for private tutoring
Subscribed to get online class help for ashford psy week 1-5 class.

Week 3 58%
doc icon homework provider

I got A grade in class, Amanda
with the help of homework provider I made it to pass my acct 505 class.

Rated By Client
 5/5