Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Invoice Class Namespace: Last.First.Business This abstract class contains functionality that supports the business process of creating an invoice. Create the Invoice class in the Library

Invoice Class

Namespace: Last.First.Business

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 Last.First.Business namespace.

Design

image text in transcribed

Fields

- provincialSalesTaxRate : decimal - The provincial sales tax rate applied to the invoice.

- goodsAndServicesTaxRate : decimal - The goods and services tax rate applied to the invoice.

Properties

+ ProvincialSalesTaxRate : decimal - Gets and sets the provincial sales tax rate.

Exceptions:

ArgumentOutOfRangeException - Thrown when the property is set to less than 0. Message: The value cannot be less than 0. Parameter name: value.

ArgumentOutOfRangeException - Thrown when the property is set to greater than 1. Message: The value cannot be greater than 1. Parameter name: value.

+ GoodsAndServicesTaxRate : decimal - Gets and sets the goods and services tax rate.

Exceptions:

ArgumentOutOfRangeException - Thrown when the property is set to less than 0. Message: The value cannot be less than 0. Parameter name: value.

ArgumentOutOfRangeException - Thrown 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 (Rounded to two decimal places).

+ GoodsAndServicesTaxCharged : decimal (Abstract) - Gets the amount of goods and services tax charged to the customer (Rounded to two decimal places).

+ SubTotal : decimal (Abstract) - Gets the subtotal of the Invoice.

+ Total : decimal - Gets the total of the Invoice. The total is the sum of the subtotal and taxes.

Methods

+ Invoice(decimal, decimal) - Initializes an instance of Invoice with a provincial and goods and services tax rates.

Parameters:

provincialSalesTaxRate - The rate of provincial tax charged to a customer.

goodsAndServicesTaxRate - The rate of goods and services tax charged to a customer.

Exceptions:

ArgumentOutOfRangeException - Thrown when the provincial sales tax rate is less than 0. Message: The argument cannot be less than 0. Parameter name: provincialSalesTaxRate.

ArgumentOutOfRangeException - Thrown when the provincial sales tax rate is greater than 1. Message: The argument cannot be greater than 1. Parameter name: provincialSalesTaxRate.

ArgumentOutOfRangeException - Thrown when the goods and services tax rate is less than 0. Message: The argument cannot be less than 0. Parameter name: goodsAndServicesTaxRate.

ArgumentOutOfRangeException - Thrown when the goods and services tax rate is greater than 1. Message: The argument cannot be greater than 1. Parameter name: goodsAndServicesTaxRate.

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 Last.First.Business namespace.

Design

image text in transcribed

Fields

- packageCost : decimal - The amount charged for the chosen package.

- fragranceCost : decimal - The amount charged for the chosen fragrance.

Properties

+ PackageCost : decimal - Gets and sets the amount charged for the chosen package.

Exception:

ArgumentOutOfRangeException - Thrown 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 - Thrown when the property is set to less than 0. Message: The value cannot be less than 0. Parameter name: value.

+ ProvincialSalesTaxCharged : decimal - Gets the amount of provincial sales tax charged to the customer. No provincial sales tax is charged for a car wash.

+ GoodsAndServicesTaxCharged : decimal - Gets the amount of goods and services tax charged to the customer (Rounded to 2 decimal places). The tax is calculated by multiplying the tax rate by the subtotal.

+ SubTotal : decimal - Gets the subtotal of the Invoice. The subtotal is the sum of the package and fragrance cost.

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:

provincialSalesTaxRate - The rate of provincial tax charged to a customer.

goodsAndServicesTaxRate - The rate of goods and services tax charged to a customer.

Exceptions:

ArgumentOutOfRangeException - Thrown when the provincial sales tax rate is less than 0. Message: The argument cannot be less than 0. Parameter name: provincialSalesTaxRate.

ArgumentOutOfRangeException - Thrown when the provincial sales tax rate is greater than 1. Message: The argument cannot be greater than 1. Parameter name: provincialSalesTaxRate.

ArgumentOutOfRangeException - Thrown when the goods and services tax rate is less than 0. Message: The argument cannot be less than 0. Parameter name: goodsAndServicesTaxRate.

ArgumentOutOfRangeException - Thrown when the goods and services tax rate is greater than 1. Message: The argument cannot be greater than 1. Parameter name: goodsAndServicesTaxRate.

+ CarWashInvoice(decimal, decimal, decimal, decimal) - Initializes an instance of CarWashInvoice with a provincial and goods, services tax rate, package cost and fragrance cost.

Parameters:

provincialSalesTaxRate - The rate of provincial tax charged to a customer.

goodsAndServicesTaxRate - 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 - Thrown when the provincial sales tax rate is less than 0. Message: The argument cannot be less than 0. Parameter name: provincialSalesTaxRate.

ArgumentOutOfRangeException - Thrown when the provincial sales tax rate is greater than 1. Message: The argument cannot be greater than 1. Parameter name: provincialSalesTaxRate.

ArgumentOutOfRangeException - Thrown when the goods and services tax rate is less than 0. Message: The argument cannot be less than 0. Parameter name: goodsAndServicesTaxRate.

ArgumentOutOfRangeException - Thrown when the goods and services tax rate is greater than 1. Message: The argument cannot be greater than 1. Parameter name: goodsAndServicesTaxRate.

ArgumentOutOfRangeException - Thrown when the package cost is less than 0. Message: The argument cannot be less than 0. Parameter name: packageCost.

ArgumentOutOfRangeException - Thrown when the fragrance cost is less than 0. Message: The argument cannot be less than 0. Parameter name: fragranceCost.

Please show how to inherit Invoice to CarWashInvoice in C# as I am currently getting a CS0534 error.

"abstract Invoice - provincialSalesTaxRate : decimal - goodsAndServicesTaxRate : decimal +> ProvincialSalesTaxRate : decimal +> GoodsAndServicesTaxRate : decimal +>> ProvincialSalesTaxCharged : decimal +> GoodsAndServicesTaxCharged : decimal +>> SubTotal : decimal +> Total : decimal +Invoice(provincialSalesTaxRate : decimal, goodsAndServicesTaxRate : decimal) CarWashlnvoice - packageCost : decimal - fragranceCost : decimal +> PackageCost : decimal +> FragranceCost : decimal +> ProvincialSalesTaxCharged : decimal +> GoodsAndServicesTaxCharged : decimal +> SubTotal : decimal +CarWashlnvoice(provincialSalesTaxRate : decimal, goodsAndServicesTaxRate : decimal) +CarWashlnvoice(provincialSalesTaxRate : decimal, goodsAndServicesTaxRate : decimal, packageCost : decimal, fragranceCost : decimal)

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

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

Find all solutions in CC of the given equation. z 3 = -8

Answered: 1 week ago

Question

How is social networking used in informal training?

Answered: 1 week ago

Question

What are some career development methods?

Answered: 1 week ago