Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a class called Baker that inherits from the CommissionEmployee class in Figure 11.10 In your Baker class, Earnings() should calculate the fee earned for

Create a class called Baker that inherits from the CommissionEmployee class in Figure 11.10

In your Baker class, Earnings() should calculate the fee earned for a baking job.

Gross sales represent the amount charged to a customer and commission rate represents the % that a particular baker earns.

Baker Earnings is calculated as the skill level base rate + amount charged * commission rate.

Skill level base rate is $500 for an experienced carpenter and $250 for an apprentice.

Your class should contain a constructor that inherits from the CommissionEmployee class and initializes the instance variables.

The Baker class should add an instance variable for the name of the customer where the baking service occurred. Also, add an instance variable to represent skill level. Create a property for them also.

Create a second class that prompts the user for the information for two carpenters, creates the 2 two baker objects, then displays every two carpenters.

One baker should be experienced and one should be an apprentice.

THIS MUST BE YOUR OWN ORIGINAL WORK!!!

image text in transcribed

image text in transcribedimage text in transcribed

DO NOT COPY FROM ANY ANSWER FROM ANOTHER POST!!

DO NOT COPY FROM :

https://www.chegg.com/homework-help/questions-and-answers/written-c-using-visual-studio-2015-book-basing-figure-1110-visual-c-program-deitel-hm-deit-q24311277

https://www.chegg.com/homework-help/questions-and-answers/written-c-console-application-code-following-create-class-called-baker-inherits-commission-q35268144?trackid=z3SRgs9r

https://www.chegg.com/homework-help/questions-and-answers/c-sharp-create-class-called-cabinetmaker-inherits-commissionemployee-class-figure-1110-cab-q24349029

https://www.chegg.com/homework-help/questions-and-answers/written-c-using-visual-studio-2015-book-basing-figure-1110-visual-c-program-deitel-hm-deit-q24302157

or any other posted answer please.

I // Fig. 11.10: BasePlusCommissionEmployee.s 2 // BasePlusCommissionEmployee inherits from CommissionEmployee and has 3 // access to CommissionEmployee's protected members. 4 using System 6 public class BasePlusCommissionEmployee CommissionEmployee 8 private decimal baseSalary; // base salary per week 0 // six-parameter derived-class constructor // with call to base class CommissionEmployee constructor 12 public BasePlusCommissionEmployee string first, string last, 13 14 15 16 17// end six-parameter BasePlusCommissionEmployee constructor 18 string ssn, decimal sales, decimal rate, decimal salary : base first, last, ssn, sales, rate BaseSalary-salary; // validate base salary via property Fig. .10 | BasePlusCommissionEmployee inherits from CommissionEmployee and has access to CommissionEmployee's protected members. (Part I of 3.) 20 21 /7property that gets and sets // BasePlusCommissionEmployee's base salary public decimal BaseSalary 23 24 25 26 27 28 29 30 3 I 32 get return baseSalary I/end get set if(value )s 0 ) baseSalary-value; else throw new ArgumentOutOfRangeException"BaseSalary", value, "BaseSalary must be 0" 34 35 36 end set end property BaseSalary Fig. 11.10 | BasePlusCommissionEmployee inherits from CommissionEmployee and has access to CommissionEmployee's protected members. (Part 2 of 3.) I // Fig. 11.10: BasePlusCommissionEmployee.s 2 // BasePlusCommissionEmployee inherits from CommissionEmployee and has 3 // access to CommissionEmployee's protected members. 4 using System 6 public class BasePlusCommissionEmployee CommissionEmployee 8 private decimal baseSalary; // base salary per week 0 // six-parameter derived-class constructor // with call to base class CommissionEmployee constructor 12 public BasePlusCommissionEmployee string first, string last, 13 14 15 16 17// end six-parameter BasePlusCommissionEmployee constructor 18 string ssn, decimal sales, decimal rate, decimal salary : base first, last, ssn, sales, rate BaseSalary-salary; // validate base salary via property Fig. .10 | BasePlusCommissionEmployee inherits from CommissionEmployee and has access to CommissionEmployee's protected members. (Part I of 3.) 20 21 /7property that gets and sets // BasePlusCommissionEmployee's base salary public decimal BaseSalary 23 24 25 26 27 28 29 30 3 I 32 get return baseSalary I/end get set if(value )s 0 ) baseSalary-value; else throw new ArgumentOutOfRangeException"BaseSalary", value, "BaseSalary must be 0" 34 35 36 end set end property BaseSalary Fig. 11.10 | BasePlusCommissionEmployee inherits from CommissionEmployee and has access to CommissionEmployee's protected members. (Part 2 of 3.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

Describe the steps in the Grinchs decision-making process.

Answered: 1 week ago