Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Visual Studio here is the 1st Part (https://www.chegg.com/homework-help/questions-and-answers/creating-projects-solutions-visual-studio-design-modify-add-subtract-members-classes-const-q66210449?trackid=blI4vSLp ) Please zoom in the photo to actually see the details thank you! Sales Quote -vehicle Sale

Visual Studio

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

image text in transcribed

image text in transcribed

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

Please zoom in the photo to actually see the details thank you!

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 Visual Studio Solution Properties VehicleSale Price: decimal - Gets and sets the sale price of the vehicle. TradeInAmount: decimal - Gets and sets the trade in amount. Accessories Chosen : Accessories - Gets and sets the accessories that were chosen. ExteriorFinishChosen : ExteriorFinish - Gets and sets the exterior finish that was chosen. AccessoryCost: 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). SalesTaxdecimal - 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 SalesQuote class to include the following exceptions: Vehicle Sale Price Property ArgumentOutOfRangeException - 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" TradeInAmount 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". 2 ExteriorFinishChosen Property System.ComponentModel. InvalidEnum ArgumentException - When the property is set to an invalid value. Message: "The value is an invalid enumeration value". SalesQuote(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: "vehicleSalePrice". ArgumentOutOfRangeException - When the trade in amount is less than 0. Message: "The argument cannot be less than 0." Parameter name: "tradeInAmount". 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.InvalidEnumArgumentException - When the accessories chosen is an invalid argument. Message: "The argument is an invalid enumeration value". System.ComponentModel.InvalidEnumArgumentException - 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: "vehicleSalePrice". ArgumentOutOfRangeException - When the trade in amount is less than 0. Message: "'The argument cannot be less than 0." Parameter name: "tradeInAmount". ArgumentOutOfRangeException - When the sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name:"sales Tax Rate". ArgumentOutOfRangeException - When the sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "sales Tax Rate". 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 provincialSales TaxRate: decimal - The provincial sales tax rate applied to the invoice. goodsAndServices TaxRate : decimal - The goods and services tax rate applied to the invoice. 3 Properties ProvincialSales Tax Rate : 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". ArgumentOutOfRangeException - When the property is set to greater than 1. Message: "The value cannot be greater than 1. Parameter name: "value". . GoodsAndServices TaxRate : decimal 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". . ProvincialSales TaxCharged: 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. 4 Parameters: provincialSales 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: "provincialSales Tax Rate". ArgumentOutOfRangeException - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "provincialSales TaxRate". ArgumentOutOfRangeException - When the goods and services tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "goodsAndServices Tax Rate". ArgumentOutOfRangeException - When the goods and services tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "goodsAndServices Tax Rate". ServiceInvoice Class . This class contains functionality that supports the business process of creating an invoice for the service department. The ServiceInvoice class derives from the Invoice class. Create the ServiceInvoice 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. PartsCost: decimal Gets the amount charged for parts. MaterialCost: decimal Gets the amount charged for shop materials. ProvincialSalesTaxCharged: decimal Gets the amount of provincial sales tax charged to the customer. Provincial Sales Tax is not applied to labour cost. 5 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 LabourCost, PartsCost and MaterialCost properties have a private set accessor. *) Methods ServiceInvoice(decimal, decimal) Initializes an instance of ServiceInvoice with a provincial and goods and services tax rates. Parameters: provincialSales Tax Rate - 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: "provincialSales Tax Rate". ArgumentOutOfRangeException - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "provincialSales Tax Rate". 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". 6 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". CarWashInvoice Class - This class contains functionality that supports the business process of creating an invoice for the car wash department. The CarWashInvoice class derives from the Invoice class. Create the CarWashInvoice class in the Library project. This class must be defined under the My.Business namespace. Fields packageCost: decimal - The amount charged for the chosen package. fragrance Cost: decimal - The amount charged for the chosen fragrance. Properties Package Cost: 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". FragranceCost: decimal 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". 7 ProvincialSales TaxCharged: decimal Gets the amount of provincial sales tax charged to the customer. No provincial sales tax is charged for a car wash. GoodsAndServices TaxCharged: decimal Gets the amount of goods and services tax charged to the customer. Sub Total : decimal Gets the subtotal of the Invoice. Total: decimal Gets the total of the Invoice. Methods CarWashInvoice(decimal, decimal) Initializes an instance of CarWashInvoice with a provincial and goods and services tax rates. The package cost and fragrance cost are zero. Parameters: provincialSales Tax Rate - 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: "provincialSales Tax Rate". ArgumentOutOfRangeException - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "provincialSales TaxRate". ArgumentOutOfRangeException - When the goods and services tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "goodsAndServices Tax Rate". ArgumentOutOfRangeException - When the goods and services tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "goodsAndServices TaxRate". 8 CarWashInvoice(decimal, decimal, decimal, decimal) Initializes an instance of CarWashInvoice with a provincial and goods, services tax rate, package cost and fragrance cost. Parameters: . provincialSales TaxRate - The rate of provincial tax charged to a customer. goodsAndServices TaxRate - The rate of goods and services tax charged to a customer. packageCost - The cost of the chosen package. fragranceCost - 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: "provincialSales Tax Rate". 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: "goods And Services Tax Rate". ArgumentOutOfRangeException - When the package cost is less than 0. Message: "The argument cannot be less than 0." Parameter name: "packageCost". ArgumentOutOfRangeException - When the fragrance cost is less than 0. Message: "The argument cannot be less than 0." Parameter name: "fragranceCost". CostType Enumeration Namespace: Mv.Business The CostType enumeration has the following values: . . Labour Part Material Financial Class This static class contains functionality that includes financial functions. 9 Create the Financial class in the library project. This class must be defined under the Mv.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: ArgumentOutOfRangeException - 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". CODE to CALCULATE the Payment: decimal future Value = 0; decimal type = 0; decimal payment = 0; if (rate == 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); 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 Visual Studio Solution Properties VehicleSale Price: decimal - Gets and sets the sale price of the vehicle. TradeInAmount: decimal - Gets and sets the trade in amount. Accessories Chosen : Accessories - Gets and sets the accessories that were chosen. ExteriorFinishChosen : ExteriorFinish - Gets and sets the exterior finish that was chosen. AccessoryCost: 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). SalesTaxdecimal - 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 SalesQuote class to include the following exceptions: Vehicle Sale Price Property ArgumentOutOfRangeException - 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" TradeInAmount 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". 2 ExteriorFinishChosen Property System.ComponentModel. InvalidEnum ArgumentException - When the property is set to an invalid value. Message: "The value is an invalid enumeration value". SalesQuote(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: "vehicleSalePrice". ArgumentOutOfRangeException - When the trade in amount is less than 0. Message: "The argument cannot be less than 0." Parameter name: "tradeInAmount". 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.InvalidEnumArgumentException - When the accessories chosen is an invalid argument. Message: "The argument is an invalid enumeration value". System.ComponentModel.InvalidEnumArgumentException - 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: "vehicleSalePrice". ArgumentOutOfRangeException - When the trade in amount is less than 0. Message: "'The argument cannot be less than 0." Parameter name: "tradeInAmount". ArgumentOutOfRangeException - When the sales tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name:"sales Tax Rate". ArgumentOutOfRangeException - When the sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "sales Tax Rate". 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 provincialSales TaxRate: decimal - The provincial sales tax rate applied to the invoice. goodsAndServices TaxRate : decimal - The goods and services tax rate applied to the invoice. 3 Properties ProvincialSales Tax Rate : 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". ArgumentOutOfRangeException - When the property is set to greater than 1. Message: "The value cannot be greater than 1. Parameter name: "value". . GoodsAndServices TaxRate : decimal 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". . ProvincialSales TaxCharged: 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. 4 Parameters: provincialSales 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: "provincialSales Tax Rate". ArgumentOutOfRangeException - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "provincialSales TaxRate". ArgumentOutOfRangeException - When the goods and services tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "goodsAndServices Tax Rate". ArgumentOutOfRangeException - When the goods and services tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "goodsAndServices Tax Rate". ServiceInvoice Class . This class contains functionality that supports the business process of creating an invoice for the service department. The ServiceInvoice class derives from the Invoice class. Create the ServiceInvoice 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. PartsCost: decimal Gets the amount charged for parts. MaterialCost: decimal Gets the amount charged for shop materials. ProvincialSalesTaxCharged: decimal Gets the amount of provincial sales tax charged to the customer. Provincial Sales Tax is not applied to labour cost. 5 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 LabourCost, PartsCost and MaterialCost properties have a private set accessor. *) Methods ServiceInvoice(decimal, decimal) Initializes an instance of ServiceInvoice with a provincial and goods and services tax rates. Parameters: provincialSales Tax Rate - 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: "provincialSales Tax Rate". ArgumentOutOfRangeException - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "provincialSales Tax Rate". 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". 6 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". CarWashInvoice Class - This class contains functionality that supports the business process of creating an invoice for the car wash department. The CarWashInvoice class derives from the Invoice class. Create the CarWashInvoice class in the Library project. This class must be defined under the My.Business namespace. Fields packageCost: decimal - The amount charged for the chosen package. fragrance Cost: decimal - The amount charged for the chosen fragrance. Properties Package Cost: 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". FragranceCost: decimal 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". 7 ProvincialSales TaxCharged: decimal Gets the amount of provincial sales tax charged to the customer. No provincial sales tax is charged for a car wash. GoodsAndServices TaxCharged: decimal Gets the amount of goods and services tax charged to the customer. Sub Total : decimal Gets the subtotal of the Invoice. Total: decimal Gets the total of the Invoice. Methods CarWashInvoice(decimal, decimal) Initializes an instance of CarWashInvoice with a provincial and goods and services tax rates. The package cost and fragrance cost are zero. Parameters: provincialSales Tax Rate - 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: "provincialSales Tax Rate". ArgumentOutOfRangeException - When the provincial sales tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "provincialSales TaxRate". ArgumentOutOfRangeException - When the goods and services tax rate is less than 0. Message: "The argument cannot be less than 0." Parameter name: "goodsAndServices Tax Rate". ArgumentOutOfRangeException - When the goods and services tax rate is greater than 1. Message: "The argument cannot be greater than 1." Parameter name: "goodsAndServices TaxRate". 8 CarWashInvoice(decimal, decimal, decimal, decimal) Initializes an instance of CarWashInvoice with a provincial and goods, services tax rate, package cost and fragrance cost. Parameters: . provincialSales TaxRate - The rate of provincial tax charged to a customer. goodsAndServices TaxRate - The rate of goods and services tax charged to a customer. packageCost - The cost of the chosen package. fragranceCost - 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: "provincialSales Tax Rate". 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: "goods And Services Tax Rate". ArgumentOutOfRangeException - When the package cost is less than 0. Message: "The argument cannot be less than 0." Parameter name: "packageCost". ArgumentOutOfRangeException - When the fragrance cost is less than 0. Message: "The argument cannot be less than 0." Parameter name: "fragranceCost". CostType Enumeration Namespace: Mv.Business The CostType enumeration has the following values: . . Labour Part Material Financial Class This static class contains functionality that includes financial functions. 9 Create the Financial class in the library project. This class must be defined under the Mv.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: ArgumentOutOfRangeException - 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". CODE to CALCULATE the Payment: decimal future Value = 0; decimal type = 0; decimal payment = 0; if (rate == 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)

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

Students also viewed these Databases questions

Question

Visual Studio here is the 1st Part...

Answered: 1 week ago

Question

Identify the elements that make up the employee reward package.

Answered: 1 week ago

Question

Understand the purpose, value and drawbacks of the interview.

Answered: 1 week ago