Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ZOOm In pic pls thanks SalesQuote Class Add a class called SalesQuote to the MyLibrary project. Copy your code from the previous assignment into this

ZOOm In pic pls thanks

image text in transcribed

SalesQuote Class

Add a class called SalesQuote to the MyLibrary project. Copy your code from the previous assignment into this file.

Click here: part 1: ( https://www.chegg.com/homework-help/questions-and-answers/creating-projects-solutions-visual-studio-design-modify-add-subtract-members-classes-const-q66210449?trackid=tL31TJtu )

Update the SalesQuote class to replace methods with properties.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

here is the Part 1 of the assignment: part 1: https://www.chegg.com/homework-help/questions-and-answers/creating-projects-solutions-visual-studio-design-modify-add-subtract-members-classes-const-q66210449?trackid=tL31TJtu

Sales Quote -vehicle Sale Price: decimal -tradelnAmount: decimal -sales Tax Rate : decimal -accessoriesChosen : Accessories -exteriorFinishChosen : ExteriorFinish > +VehicleSale Price : decimal > +TradeInAmount: decimal > +AccessoriesChosen : Accessories > +Exterior FinishChosen : ExteriorFinish > > +Accessory Cost: decimal > > +FinishCost: decimal > > +SubTotal: decimal > > +SalesTax : decimal > > +Total : decimal > > +AmountDue : decimal +Sales Quote(vehicleSale Price : decimal, tradelnAmount : decimal, sales TaxRate : decimal, accessoriesChosen : Accessories, exterior FinishChosen : ExteriorFinish) +Sales Quote(vehicleSale Price : decimal, tradelnAmount : decimal, sales TaxRate : decimal) > > V > ExteriorFinish > Accessories Invoice -provincialSalesTax Rate : decimal -goodsAndServices Tax Rate : decimal > + ProvincialSales Tax Rate : decimal > +GoodsAndServices Tax Rate : decimal |> > +ProvincialSalesTaxCharged: decimal > > +GoodsAndServices TaxCharged: decimal > > +SubTotal : decimal > > +Total : decimal +Invoice(provincial Sales TaxRate : decimal, goodsAndServicesTax Rate : decimal) The ProvincialSalesTaxChanged, GoodsAndServices Tax Charged, and SubTotal properties are all abstract. This diagramming tool can not represent properties as abstract. > Cost Type Labour Part Material Servicelnvoice > > +LabourCost : decimal > > +Parts Cost : decimal > > +MaterialCost : decimal > > +ProvincialSalesTaxCharged: decimal > > +GoodsAndServicesTaxCharged: decimal > > +SubTotal : decimal > > +Total : decimal +Servicelnvoice(provincialTax Rate : decimal, goodsAndServices Tax Rate : decimal) +AddCost(type: Cost Type, amount : decimal) CarWashinvoice -packageCost : decimal -fragranceCost : decimal > +PackageCost : decimal > +FragranceCost : decimal > > +ProvincialSalesTaxCharged: decimal > > +GoodsAndServicesTaxCharged: decimal > > +SubTotal : decimal > > +Total : decimal +CarWashInvoice(provincialSales TaxRate : decimal, goodsAndServices TaxRate : decimal) +CarWashInvoice provincialSales TaxRate: decimal, goodsAndService TaxRate : decimal, packageCost: decimal, fragranceCost : decimal) > > Financial +GetPayment(rate : decimal, numberOfPaymentPeriods : int, present Value: decimal) 1 Properties VebisleSale Price: decimal - Gets and sets the sale price of the vehicle. TradelnAmeunt decimal - Gets and sets the trade in amount. Accessories Chosen: Accessories - Gets and sets the accessories that were chosen ExteriorFinish Sheseo_Exteciecfinish - Gets and sets the exterior finish that was chosen Accesso Costa decimal - Gets the cost of accessories chosen. FinishCost: decimal - Gets the cost of the exterior finish chosen. SubTotal: decimal - Gets the sum of the vehicle's sale price and the Accessory and Finish Cost (rounded to two decimal places). Sales Taxe decimal - Gets the amount of tax to charge based on the subtotal (rounded to two decimal places). Total: decimal - Gets the sum of the subtotal and taxes. Amount Due: decimal - Gets the result of subtracting the trade-in amount from the total (rounded to two decimal places). Exceptions Update the Sales Quote class to include the following exceptions: Vehicle Sale Price Property ArgumentOutOfRange Exception - When the property is set to less than or equal to 0. Message: "The value cannot be less than or equal to 0. Parameter Name: "value" TradelnAmount Property ArgumentOutOfRangeException - When the property is set to less than 0. Message: "The value cannot be less than 0." Parameter Name:"value" Accessories Chosen Property System.ComponentModel.InvalidEnum ArgumentException - When the property is set to an invalid value. Message: "The value is an invalid enumeration value". Exterior Finish Chosen Property System.ComponentModel.InvalidEnum ArgumentException - When the property is set to an invalid value. Message: "The value is an invalid enumeration value" Sales Quote(decimal, decimal, decimal, Accessories, ExteriorFinish) ArgumentOutOfRangeException - When the vehicle sale price is less than or equal to 0. Message: "The argument cannot be less than or equal to 0." Parameter name: "vehicleSalesise" ArgumentOutOfRangeException - When the trade in amount is less than 0. Message: "The argument cannot be less than 0." Parameter name: "tradelnAmount". 2 ArgumentOutOfRangeException - When the sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name:"sales TaxRate" ArgumentOutOfRangeException - When the sales tax rate is greater than 1. Message: "The argument cannot be greater than 1. Parameter name: "sales TaxRate". System.ComponentModel.InvalidEnum ArgumentException - When the accessories chosen is an invalid argument. Message: "The argument is an invalid enumeration value". System.ComponentModel. InvalidEnumArqumentException - When the exterior finish chosen is an invalid argument Message: "The argument is an invalid enumeration value". Sales Quote(decimal, decimal, decimal) ArgumentOutOfRangeException - When the vehicle sale price is less than or equal to 0. Message: "The argument cannot be less than or equal to 0." Parameter name: "vehicle Sale Price" ArgumentOutOfRangeException - When the trade in amount is less than 0. Message: "The argument cannot be less than 0." Parameter name: "tradelnAmgunt" ArgumentOutOfRangeException - When the sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name:"sales TaxRate". ArgumentOutOfRangeException - When the sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "sales TaxRate". Invoice Class This abstract class contains functionality that supports the business process of creating an invoice. Create the Invoice class in the Library project. This class must be defined under the My Business namespace. Fields RlaxincialSales TaxRate_ decimal - The provincial sales tax rate applied to the invoice. JagdsAndServices TaxRate: decimal - The goods and services tax rate applied to the invoice. Properties ProvincialSales TaxRate_decimal Gets and sets the provincial sales tax rate. Exceptions: ArgumentOutOfRangeException - When the property is set to less than 0. Message: "The value cannot be less than 0." Parameter name: "value". ArgumentOutOfRange Exception - When the property is set to greater than 1. Message: "The value cannot be greater than 1." Parameter name: "value". GoodsAnd Services TaxRate: decimal 3 Gets and sets the goods and services tax rate. Exceptions: ArgumentOutOfRangeException - When the property is set to less than 0. Message: "The value cannot be less than 0." Parameter name: "value". ArgumentOutOfRangeException - When the property is set to greater than 1. Message: "The value cannot be greater than 1. Parameter name: "value". ProvincialSalesTaxCharged: decimal (Abstract) Gets the amount of provincial sales tax charged to the customer. GoodsAndServices TaxCharged decimal (Abstract) Gets the amount of goods and services tax charged to the customer. SubTotal: decimal (Abstract) Gets the subtotal of the Invoice. Total: decimal Gets the total of the Invoice (Subtotal + Taxes). Methods Invoice(decimal, decimal) Initializes an instance of Invoice with a provincial and goods and services tax rates. Parameters: ReavincialSales TaxRate - The rate of provincial tax charged to a customer. ugodsAndServices TaxRate - The rate of goods and services tax charged to a customer. Exceptions: ArgumentOutOfRangeException - When the provincial sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name "provinsialSales TaxRate". ArgumentOutOfRangeException - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "provincialSalesTaxRate" ArgumentOutOfRangeException - When the goods and services tax rate is less than 0. Message: "The argument cannot be less than 0. Parameter name: "goodsAnd Services TaxRate" ArgumentOutOfRangeException - When the goods and services tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "goodsAndServices TaxRate" Servicelovoice Class This class contains functionality that supports the business process of creating an invoice for the service department. The Servicelovcice class derives from the Invoice class. Create the Servicelaxoice class in the Library project. This class must be defined under the My Business namespace. Properties Labour Cost: decimal Gets the amount charged for labour. Parts Cost: decimal Gets the amount charged for parts. MaterialCost: decimal Gets the amount charged for shop materials. Provincial Sales TaxCharged: decimal Gets the amount of provincial sales tax charged to the customer. Provincial Sales Tax is not applied to labour cost. GoodsAndServices TaxCharged: decimal Gets the amount of goods and services tax charged to the customer. SubTotal: decimal Gets the subtotal of the Invoice. Total: decimal Gets the total of the Invoice. The Labour Cost Pacts.cost and Material est properties have a private set accessor. Methods Servicelovoice(decimal, decimal) Initializes an instance of Servicelaxeice with a provincial and goods and services tax rates. Parameters: stavinsialSales TaxRate - The rate of provincial tax charged to a customer goodsAndServices TaxRate - The rate of goods and services tax charged to a customer. Exceptions: ArgumentOutOfRangeException - When the provincial sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "Rrovincial Sales TaxRate" 5 ArgumentOutOfRangeException - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "RrovincialSales TaxRate" ArgumentOutOfRange Exception - When the goods and services tax rate is less than 0. Message: "The argument cannot be less than 0. Parameter name: "goodsAndServices TaxRate" ArgumentOutOfRangeException - When the goods and services tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "goodsAndServices TaxRate" AddCost(CostType, decimal) : void Increments a specified cost by the specified amount. Parameters: type - The type of cost being incremented. amount - The amount the cost is being incremented by Exceptions: System.ComponentModel.InvalidEnum ArgumentException - When the cost type is an invalid argument. Message: "The argument is an invalid enumeration value". ArgumentOutOfRangeException - When the amount is less than or equal to 0. Message: "The argument cannot be less than or equal to 0." Parameter name: "amount". CarWasblaxoise Class This class contains functionality that supports the business process of creating an invoice for the car wash department. The CarWashlaxcise class derives from the Invoice class. Create the Carlasblaxoise class in the Library project. This class must be defined under the My Business namespace. Fields Rackage Cast decimal - The amount charged for the chosen package. fragrance.Cesta decimal - The amount charged for the chosen fragrance. Properties PackageCost: decimal Gets and sets the amount charged for the chosen package. Exception: ArgumentOutOfRange Exception - When the property is set to less than 0. Message: "The value cannot be less than 0." Parameter name: "value". Fragrance Cost: decimal 6 Gets and sets the amount charged for the chosen fragrance. Exception: ArgumentOutOfRangeException - When the property is set to less than 0. Message: "The value cannot be less than 0." Parameter name:"value". ProvincialSales TaxCharged: decimal Gets the amount of provincial sales tax charged to the customer. No provincial sales tax is charged for a car wash. GoedsAndServices TaxCharged: decimal Gets the amount of goods and services tax charged to the customer. SubTotal: decimal Gets the subtotal of the Invoice. Total: decimal Gets the total of the Invoice. Methods CarWasblaxoise(decimal, decimal) Initializes an instance of Callashlaxoice with a provincial and goods and services tax rates. The package cost and fragrance cost are zero. Parameters: ReavincialSales TaxRate - The rate of provincial tax charged to a customer. asodsAndServices TaxRate - The rate of goods and services tax charged to a customer. Exceptions: ArgumentOutOfRangeException - When the provincial sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "RrovincialSales TaxRate". ArgumentOutOfRange Exception - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "BrovincialSales TaxRate" ArgumentOutOfRange Exception - When the goods and services tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "goodsAnd Services TaxRate" ArgumentOutOfRange Exception - When the goods and services tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "goodsAndServices TaxRate" CarWasblaxoice(decimal, decimal, decimal, decimal) 7 Initializes an instance of Car Washlaxcice, with a provincial and goods, services tax rate, package cost and fragrance cost. Parameters: provincial Sales TaxRate - The rate of provincial tax charged to a customer. gegdsand Services TaxRate - The rate of goods and services tax charged to a customer. RackageCost - The cost of the chosen package. fragrance Cest - The cost of the chosen fragrance. Exceptions: ArgumentOutOfRangeException - When the provincial sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name:"provincialSales TaxRate". ArgumentOutOfRangeException - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "RrovincialSalesTaxRate". ArgumentOutOfRangeException - When the goods and services tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "goodsAndServices TaxRate" ArgumentOutOfRangeException - When the goods and services tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "goodsAndServices TaxRate" ArgumentOutOfRangeException - When the package cost is less than 0. Message: "The argument cannot be less than 0." Parameter name: "RackageCost" ArgumentOutOfRangeException - When the fragrance cost is less than 0. Message: "The argument cannot be less than 0." Parameter name: "fragrance Cost" CostType Enumeration Namespace: My Business The CostType enumeration has the following values: Labour, Part. Material Financial Class This static class contains functionality that includes financial functions. Create the Financial class in the library project. This class must be defined under the My.Business namespace. Methods GetPayment(decimal, int, decimal): decimal Returns the payment amount for an annuity based on periodic, fixed payments and a fixed interest rate. Parameters: rate - the interest rate per period. For example, if the rate is an annual percentage rate (APR) of 10 percent and the customer makes monthly payments, the rate per period is 0.1/12, or 0.0083. numberOfPaymentPeriods - the total number of payment periods in the annuity. For example, if you make monthly payments on a four-year car loan, your loan has a total of 4 x 12 (or 48) payment periods. presentValue - the present value (or lump sum) that a series of payments to be paid in the future is worth now. For example, when a customer finances a car, the loan amount is the present value to the lender of the car payments the customer will make. Exceptions: ArgumentOutOfRange Exception - When the rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "rate". ArgumentOutOfRangeException - When the rate is greater than 1. Message: "The argument cannot be greater than 1. Parameter name: "rate". ArgumentOutOfRangeException - When the number of payments is less than or equal to zero. Message: "The argument cannot be less than or equal to 0. Parameter name: "numberOfPaymentPeriods". ArgumentOutOfRangeException - When the present value is less than or equal to zero. Message: "The argument cannot be less than or equal to 0." Parameter name: "presentValue". The following is the code for calculating the payment: CODE to CALCULATE the Payment: decimal future Value = 0; decimal type = 0; decimal payment = 0; 0) payment = presentValue / numberOfPaymentPeriods; else payment = rate * (future Value + presentValue * (decimal) Math.Pow(double)(1 + rate), (double)numberOfPaymentPeriods)) / (((decimal)Math.Pow((double)(1 + rate), (double)numberOfPaymentPeriods) - 1)*(1 + rate * type)); return Math.round(payment, 2): if (rate Sales Quote -vehicle Sale Price: decimal -tradelnAmount: decimal -sales Tax Rate : decimal -accessoriesChosen : Accessories -exteriorFinishChosen : ExteriorFinish > +VehicleSale Price : decimal > +TradeInAmount: decimal > +AccessoriesChosen : Accessories > +Exterior FinishChosen : ExteriorFinish > > +Accessory Cost: decimal > > +FinishCost: decimal > > +SubTotal: decimal > > +SalesTax : decimal > > +Total : decimal > > +AmountDue : decimal +Sales Quote(vehicleSale Price : decimal, tradelnAmount : decimal, sales TaxRate : decimal, accessoriesChosen : Accessories, exterior FinishChosen : ExteriorFinish) +Sales Quote(vehicleSale Price : decimal, tradelnAmount : decimal, sales TaxRate : decimal) > > V > ExteriorFinish > Accessories Invoice -provincialSalesTax Rate : decimal -goodsAndServices Tax Rate : decimal > + ProvincialSales Tax Rate : decimal > +GoodsAndServices Tax Rate : decimal |> > +ProvincialSalesTaxCharged: decimal > > +GoodsAndServices TaxCharged: decimal > > +SubTotal : decimal > > +Total : decimal +Invoice(provincial Sales TaxRate : decimal, goodsAndServicesTax Rate : decimal) The ProvincialSalesTaxChanged, GoodsAndServices Tax Charged, and SubTotal properties are all abstract. This diagramming tool can not represent properties as abstract. > Cost Type Labour Part Material Servicelnvoice > > +LabourCost : decimal > > +Parts Cost : decimal > > +MaterialCost : decimal > > +ProvincialSalesTaxCharged: decimal > > +GoodsAndServicesTaxCharged: decimal > > +SubTotal : decimal > > +Total : decimal +Servicelnvoice(provincialTax Rate : decimal, goodsAndServices Tax Rate : decimal) +AddCost(type: Cost Type, amount : decimal) CarWashinvoice -packageCost : decimal -fragranceCost : decimal > +PackageCost : decimal > +FragranceCost : decimal > > +ProvincialSalesTaxCharged: decimal > > +GoodsAndServicesTaxCharged: decimal > > +SubTotal : decimal > > +Total : decimal +CarWashInvoice(provincialSales TaxRate : decimal, goodsAndServices TaxRate : decimal) +CarWashInvoice provincialSales TaxRate: decimal, goodsAndService TaxRate : decimal, packageCost: decimal, fragranceCost : decimal) > > Financial +GetPayment(rate : decimal, numberOfPaymentPeriods : int, present Value: decimal) 1 Properties VebisleSale Price: decimal - Gets and sets the sale price of the vehicle. TradelnAmeunt decimal - Gets and sets the trade in amount. Accessories Chosen: Accessories - Gets and sets the accessories that were chosen ExteriorFinish Sheseo_Exteciecfinish - Gets and sets the exterior finish that was chosen Accesso Costa decimal - Gets the cost of accessories chosen. FinishCost: decimal - Gets the cost of the exterior finish chosen. SubTotal: decimal - Gets the sum of the vehicle's sale price and the Accessory and Finish Cost (rounded to two decimal places). Sales Taxe decimal - Gets the amount of tax to charge based on the subtotal (rounded to two decimal places). Total: decimal - Gets the sum of the subtotal and taxes. Amount Due: decimal - Gets the result of subtracting the trade-in amount from the total (rounded to two decimal places). Exceptions Update the Sales Quote class to include the following exceptions: Vehicle Sale Price Property ArgumentOutOfRange Exception - When the property is set to less than or equal to 0. Message: "The value cannot be less than or equal to 0. Parameter Name: "value" TradelnAmount Property ArgumentOutOfRangeException - When the property is set to less than 0. Message: "The value cannot be less than 0." Parameter Name:"value" Accessories Chosen Property System.ComponentModel.InvalidEnum ArgumentException - When the property is set to an invalid value. Message: "The value is an invalid enumeration value". Exterior Finish Chosen Property System.ComponentModel.InvalidEnum ArgumentException - When the property is set to an invalid value. Message: "The value is an invalid enumeration value" Sales Quote(decimal, decimal, decimal, Accessories, ExteriorFinish) ArgumentOutOfRangeException - When the vehicle sale price is less than or equal to 0. Message: "The argument cannot be less than or equal to 0." Parameter name: "vehicleSalesise" ArgumentOutOfRangeException - When the trade in amount is less than 0. Message: "The argument cannot be less than 0." Parameter name: "tradelnAmount". 2 ArgumentOutOfRangeException - When the sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name:"sales TaxRate" ArgumentOutOfRangeException - When the sales tax rate is greater than 1. Message: "The argument cannot be greater than 1. Parameter name: "sales TaxRate". System.ComponentModel.InvalidEnum ArgumentException - When the accessories chosen is an invalid argument. Message: "The argument is an invalid enumeration value". System.ComponentModel. InvalidEnumArqumentException - When the exterior finish chosen is an invalid argument Message: "The argument is an invalid enumeration value". Sales Quote(decimal, decimal, decimal) ArgumentOutOfRangeException - When the vehicle sale price is less than or equal to 0. Message: "The argument cannot be less than or equal to 0." Parameter name: "vehicle Sale Price" ArgumentOutOfRangeException - When the trade in amount is less than 0. Message: "The argument cannot be less than 0." Parameter name: "tradelnAmgunt" ArgumentOutOfRangeException - When the sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name:"sales TaxRate". ArgumentOutOfRangeException - When the sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "sales TaxRate". Invoice Class This abstract class contains functionality that supports the business process of creating an invoice. Create the Invoice class in the Library project. This class must be defined under the My Business namespace. Fields RlaxincialSales TaxRate_ decimal - The provincial sales tax rate applied to the invoice. JagdsAndServices TaxRate: decimal - The goods and services tax rate applied to the invoice. Properties ProvincialSales TaxRate_decimal Gets and sets the provincial sales tax rate. Exceptions: ArgumentOutOfRangeException - When the property is set to less than 0. Message: "The value cannot be less than 0." Parameter name: "value". ArgumentOutOfRange Exception - When the property is set to greater than 1. Message: "The value cannot be greater than 1." Parameter name: "value". GoodsAnd Services TaxRate: decimal 3 Gets and sets the goods and services tax rate. Exceptions: ArgumentOutOfRangeException - When the property is set to less than 0. Message: "The value cannot be less than 0." Parameter name: "value". ArgumentOutOfRangeException - When the property is set to greater than 1. Message: "The value cannot be greater than 1. Parameter name: "value". ProvincialSalesTaxCharged: decimal (Abstract) Gets the amount of provincial sales tax charged to the customer. GoodsAndServices TaxCharged decimal (Abstract) Gets the amount of goods and services tax charged to the customer. SubTotal: decimal (Abstract) Gets the subtotal of the Invoice. Total: decimal Gets the total of the Invoice (Subtotal + Taxes). Methods Invoice(decimal, decimal) Initializes an instance of Invoice with a provincial and goods and services tax rates. Parameters: ReavincialSales TaxRate - The rate of provincial tax charged to a customer. ugodsAndServices TaxRate - The rate of goods and services tax charged to a customer. Exceptions: ArgumentOutOfRangeException - When the provincial sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name "provinsialSales TaxRate". ArgumentOutOfRangeException - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "provincialSalesTaxRate" ArgumentOutOfRangeException - When the goods and services tax rate is less than 0. Message: "The argument cannot be less than 0. Parameter name: "goodsAnd Services TaxRate" ArgumentOutOfRangeException - When the goods and services tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "goodsAndServices TaxRate" Servicelovoice Class This class contains functionality that supports the business process of creating an invoice for the service department. The Servicelovcice class derives from the Invoice class. Create the Servicelaxoice class in the Library project. This class must be defined under the My Business namespace. Properties Labour Cost: decimal Gets the amount charged for labour. Parts Cost: decimal Gets the amount charged for parts. MaterialCost: decimal Gets the amount charged for shop materials. Provincial Sales TaxCharged: decimal Gets the amount of provincial sales tax charged to the customer. Provincial Sales Tax is not applied to labour cost. GoodsAndServices TaxCharged: decimal Gets the amount of goods and services tax charged to the customer. SubTotal: decimal Gets the subtotal of the Invoice. Total: decimal Gets the total of the Invoice. The Labour Cost Pacts.cost and Material est properties have a private set accessor. Methods Servicelovoice(decimal, decimal) Initializes an instance of Servicelaxeice with a provincial and goods and services tax rates. Parameters: stavinsialSales TaxRate - The rate of provincial tax charged to a customer goodsAndServices TaxRate - The rate of goods and services tax charged to a customer. Exceptions: ArgumentOutOfRangeException - When the provincial sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "Rrovincial Sales TaxRate" 5 ArgumentOutOfRangeException - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "RrovincialSales TaxRate" ArgumentOutOfRange Exception - When the goods and services tax rate is less than 0. Message: "The argument cannot be less than 0. Parameter name: "goodsAndServices TaxRate" ArgumentOutOfRangeException - When the goods and services tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "goodsAndServices TaxRate" AddCost(CostType, decimal) : void Increments a specified cost by the specified amount. Parameters: type - The type of cost being incremented. amount - The amount the cost is being incremented by Exceptions: System.ComponentModel.InvalidEnum ArgumentException - When the cost type is an invalid argument. Message: "The argument is an invalid enumeration value". ArgumentOutOfRangeException - When the amount is less than or equal to 0. Message: "The argument cannot be less than or equal to 0." Parameter name: "amount". CarWasblaxoise Class This class contains functionality that supports the business process of creating an invoice for the car wash department. The CarWashlaxcise class derives from the Invoice class. Create the Carlasblaxoise class in the Library project. This class must be defined under the My Business namespace. Fields Rackage Cast decimal - The amount charged for the chosen package. fragrance.Cesta decimal - The amount charged for the chosen fragrance. Properties PackageCost: decimal Gets and sets the amount charged for the chosen package. Exception: ArgumentOutOfRange Exception - When the property is set to less than 0. Message: "The value cannot be less than 0." Parameter name: "value". Fragrance Cost: decimal 6 Gets and sets the amount charged for the chosen fragrance. Exception: ArgumentOutOfRangeException - When the property is set to less than 0. Message: "The value cannot be less than 0." Parameter name:"value". ProvincialSales TaxCharged: decimal Gets the amount of provincial sales tax charged to the customer. No provincial sales tax is charged for a car wash. GoedsAndServices TaxCharged: decimal Gets the amount of goods and services tax charged to the customer. SubTotal: decimal Gets the subtotal of the Invoice. Total: decimal Gets the total of the Invoice. Methods CarWasblaxoise(decimal, decimal) Initializes an instance of Callashlaxoice with a provincial and goods and services tax rates. The package cost and fragrance cost are zero. Parameters: ReavincialSales TaxRate - The rate of provincial tax charged to a customer. asodsAndServices TaxRate - The rate of goods and services tax charged to a customer. Exceptions: ArgumentOutOfRangeException - When the provincial sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "RrovincialSales TaxRate". ArgumentOutOfRange Exception - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "BrovincialSales TaxRate" ArgumentOutOfRange Exception - When the goods and services tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "goodsAnd Services TaxRate" ArgumentOutOfRange Exception - When the goods and services tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "goodsAndServices TaxRate" CarWasblaxoice(decimal, decimal, decimal, decimal) 7 Initializes an instance of Car Washlaxcice, with a provincial and goods, services tax rate, package cost and fragrance cost. Parameters: provincial Sales TaxRate - The rate of provincial tax charged to a customer. gegdsand Services TaxRate - The rate of goods and services tax charged to a customer. RackageCost - The cost of the chosen package. fragrance Cest - The cost of the chosen fragrance. Exceptions: ArgumentOutOfRangeException - When the provincial sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name:"provincialSales TaxRate". ArgumentOutOfRangeException - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "RrovincialSalesTaxRate". ArgumentOutOfRangeException - When the goods and services tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "goodsAndServices TaxRate" ArgumentOutOfRangeException - When the goods and services tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "goodsAndServices TaxRate" ArgumentOutOfRangeException - When the package cost is less than 0. Message: "The argument cannot be less than 0." Parameter name: "RackageCost" ArgumentOutOfRangeException - When the fragrance cost is less than 0. Message: "The argument cannot be less than 0." Parameter name: "fragrance Cost" CostType Enumeration Namespace: My Business The CostType enumeration has the following values: Labour, Part. Material Financial Class This static class contains functionality that includes financial functions. Create the Financial class in the library project. This class must be defined under the My.Business namespace. Methods GetPayment(decimal, int, decimal): decimal Returns the payment amount for an annuity based on periodic, fixed payments and a fixed interest rate. Parameters: rate - the interest rate per period. For example, if the rate is an annual percentage rate (APR) of 10 percent and the customer makes monthly payments, the rate per period is 0.1/12, or 0.0083. numberOfPaymentPeriods - the total number of payment periods in the annuity. For example, if you make monthly payments on a four-year car loan, your loan has a total of 4 x 12 (or 48) payment periods. presentValue - the present value (or lump sum) that a series of payments to be paid in the future is worth now. For example, when a customer finances a car, the loan amount is the present value to the lender of the car payments the customer will make. Exceptions: ArgumentOutOfRange Exception - When the rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "rate". ArgumentOutOfRangeException - When the rate is greater than 1. Message: "The argument cannot be greater than 1. Parameter name: "rate". ArgumentOutOfRangeException - When the number of payments is less than or equal to zero. Message: "The argument cannot be less than or equal to 0. Parameter name: "numberOfPaymentPeriods". ArgumentOutOfRangeException - When the present value is less than or equal to zero. Message: "The argument cannot be less than or equal to 0." Parameter name: "presentValue". The following is the code for calculating the payment: CODE to CALCULATE the Payment: decimal future Value = 0; decimal type = 0; decimal payment = 0; 0) payment = presentValue / numberOfPaymentPeriods; else payment = rate * (future Value + presentValue * (decimal) Math.Pow(double)(1 + rate), (double)numberOfPaymentPeriods)) / (((decimal)Math.Pow((double)(1 + rate), (double)numberOfPaymentPeriods) - 1)*(1 + rate * type)); return Math.round(payment, 2): if (rate

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions