Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Module 4 Assignment This assignment will reinforce your knowledge of the following areas: Coding classes with events Subscribing to and handling events Introduction This phase

Module 4 Assignment This assignment will reinforce your knowledge of the following areas: Coding classes with events Subscribing to and handling events Introduction This phase of the project will have you make some updates to classes in the library project. Defect Management Part of the evaluation of this assignment will include your ability to repair defects from previous versions of your code. Ensure that you are applying the feedback provided to you in the assignment evaluations. You should expect to receive deductions on this assignment for any outstanding defects. Requirements WARNING! It is highly recommended you make a copy of the your RRCAGLibraryFirstNameLastName solution prior to editing the LastName.FirstName.Business project. Update the following classes in the LastName.FirstName.Business namespace. SalesQuote Class Add the following events and methods to the SalesQuote class. Events + VehiclePriceChanged : EventHandler - Occurs when the price of the vehicle being quoted on changes. + TradeInAmountChanged : EventHandler - Occurs when the amount for the trade in vehicle changes. + AccessoriesChosenChanged : EventHandler - Occurs when the chosen accessories change. + ExteriorFinishChosenChanged : EventHandler - Occurs when the chosen exterior finish changes. Methods # OnVehiclePriceChanged() : void (virtual) - Raises the VehiclePriceChanged event. # OnTradeInAmountChanged() : void (virtual) - Raises the TradeInAmountChanged event. # OnAccessoriesChosenChanged() : void (virtual) - Raises the AccessoriesChosenChanged event. # OnExteriorFinishChosenChanged() : void (virtual) - Raises the ExteriorFinishChosenChanged event. Invoice Class Add the following events and methods to the Invoice class. Events + ProvincialSalesTaxRateChanged : EventHandler - Occurs when the provincial sales tax rate of the Invoice changes. + GoodsAndServicesTaxRateChanged : EventHandler - Occurs when the goods and services tax rate of the Invoice changes. Methods # OnProvincialSalesTaxRateChanged() : void (virtual) - Raises the ProvincialSalesTaxRateChanged event. # OnGoodsAndServicesTaxRateChanged() : void (virtual) - Raises the GoodsAndServicesTaxRateChanged event. CarWashInvoice Class Add the following events and methods to the Invoice class. Events + PackageCostChanged : EventHandler - Occurs when the package cost changes. + FragranceCostChanged : EventHandler - Occurs when the fragrance cost changes. Methods # OnPackageCostChanged() : void (virtual) - Raises the PackageCostChanged event. # OnFragranceCostChanged() : void (virtual) - Raises the FragranceCostChanged event. Events that are raised when a state of the object changes, should only be raised when the state has actually changed. Example: If the current state is 500, and its being changed using the value 500, the event would not be raised as the state would remain the same. Program Create a new Console App (.NET Framework) Project. Name the project LastName.FirstName.RRCAGTests, where FirstName and LastName correspond to your first and last names. Name the Visual Studio Solution Assignment4FirstNameLastName, where FirstName and LastName correspond to your first and last names. If your name is Dallas Page, the project and solution would be named: Project: Page.Dallas.RRCAGTests Solution: Assignment4DallasPage* Construct instances of each type modified in this assignment. Subscribe to at least one event per object. Demonstrate that the event is raised when it is expected to. User input is not required.

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions