Question
The first phase of the project will require you to begin development on an API for all RRC Automotive Group applications. The API will include
The first phase of the project will require you to begin development on an API for all RRC Automotive Group applications. The API will include classes and other constructs.
Visual Studio Solution
Create a new Visual Studio Solution named RRCAGConsoleFirstLast, where First and Last correspond to your first and last names. The solution will initially have one project.
Console Application Project
Name the Console Application Project RRCAGApp.
WARNING! Do not proceed with the rest of the assignment until you are sure you have setup the solution correctly.
SalesQuote Class
This class contains functionality that supports the business process of determining a quote price for a vehicle sale.
Note: Do not add any additional fields, properties or methods to this class. Additions to the class diagram below will result in deductions during evaluation of your assignment.
Create the SalesQuote class in the console application project. This class must be defined under the Last.First.Business namespace, where First and Last correspond to your first and last names.
Fields
- vehicleSalePrice : decimal - The selling price of the vehicle being sold.
- tradeInAmount : decimal - The amount offered to the customer for the trade in of their vehicle.
- salesTaxRate : decimal - The tax rate applied to the sale of a vehicle.
- accessoriesChosen : Accessories - The chosen accessories.
- exteriorFinishChosen : ExteriorFinish - The chosen exterior finish.
Constructors
+ SalesQuote(decimal, decimal, decimal, Accessories, ExteriorFinish) - Initializes an instance of SalesQuote with a vehicle price, trade-in value, sales tax rate, accessories chosen and exterior finish chosen.
Parameters:
- vehicleSalePrice - the selling price of the vehicle being sold.
- tradeInAmount - the amount offered to the customer for the trade in of their vehicle.
- salesTaxRate - the tax rate applied to the sale of a vehicle.
- accessoriesChosen - the value of the chosen accessories.
- exteriorFinishChose - the value of the chosen exterior finish.
+ SalesQuote(decimal, decimal, decimal) - Initializes an instance of SalesQuote with a vehicle price, trade-in amount, sales tax rate, no accessories chosen and no exterior finish chosen.
Parameters:
- vehicleSalePrice - the selling price of the vehicle being sold.
- tradeInAmount - the amount offered to the customer for the trade in of their vehicle.
- salesTaxRate - the tax rate applied to the sale of a vehicle.
Methods
+ GetVehicleSalePrice() : decimal - Gets the sale price of the vehicle.
+ SetVehicleSalePrice(decimal) : void - Sets the sale price of the vehicle.
Parameters:
- vehicleSalesPrice : decimal - the selling price of the vehicle.
+ GetTradeInAmount() : decimal - Gets the trade in amount.
+ SetTradeInAmount(decimal) : void - Sets the trade in amount.
Parameters:
- tradeInAmount : decimal - the amount offered to the customer for the trade in of their vehicle.
+ GetAccessoriesChosen() : Accessories - Gets the accessories chosen for the vehicle.
+ SetAccessoriesChosen(Accessories) : void - Sets the accessories chosen for the vehicle.
Parameters:
- accessoriesChosen : Accessories - the chosen accessories.
+ GetExteriorFinishChosen() : ExteriorFinish - Gets the exterior finish chosen for the vehicle.
+ SetExteriorFinishChosen(ExteriorFinish) : void - Sets the exterior finish chosen for the vehicle.
Parameters:
- exteriorFinishChosen : ExteriorFinish - the chosen exterior finish.
+ GetAccessoryCost() : decimal - Returns the cost of the accessories chosen.
Accessories have the following costs:
- Stereo System - $505.05
- Leather Interior - $1,010.10
- Computer Navigation - $1,515.15
+ GetExteriorFinishCost() : decimal - Returns the cost of the exterior finish chosen.
Exterior Finishes have the following costs:
- Standard - $202.02
- Pearlized - $404.04
- Custom - $606.06
+ GetSubTotal() : decimal - Returns the sum of the vehicles sale price, accessories and exterior finish costs.
+ GetSalesTax() : decimal - Returns the amount of tax to charge based on the subtotal.
+ GetTotal() : decimal - Returns the sum of the subtotal and taxes.
+ GetAmountDue() : decimal - Returns the difference of the total and trade-in amount.
+ ToString() : String - Returns the String representation of a SalesQuote.
Use the following format:
Vehicle Sale Price: {price} Trade-in Amount: {amount} Accessories Cost: {cost} Finish Cost: {cost} SubTotal: {subtotal} Total: {total} Amount Due: {amount}
Ensure that currency values are formatted as currency.
Note: Methods that return a currency value must be rounded to two decimal places.
Accessories Enumeration
Namespace: Last.First.Business
The Accessories enumeration has the following values:
- None
- StereoSystem
- LeatherInterior
- StereoAndLeather
- ComputerNavigation
- StereoAndNavigation
- LeatherAndNavigation
- All
ExteriorFinish Enumeration
Namespace: Last.First.Business
The ExteriorFinish enumeration has the following values:
- None
- Standard
- Pearlized
- Custom
Program
Program Class
The Program class is generated when you use the Console Application Project template. Ensure the Program class is in the RRCAGApp namespace.
Program Requirements
- Construct a SalesQuote instance.
- Verify that the object functions correctly by testing all behaviors and all their outcomes. Print the results to the console in this format:
Testing method GetVehicleSalesPrice() Test 1 Expected: 5000.00 Actual: 5000.00 Testing method SetVehicleSalesPrice(decimal) Test 1 Expected: 9000.00 Actual: 5000.00
Note: DO NOT use keyboard input. Hard code all test values.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started