Help needed Created in C Console form Create a program to ke
Help needed
Created in C# Console form
Create a program to keep track of vehicle oil changes. The program will store data about the vehicle, the products needed, and the date of the last oil change. If a vehicle is within one month of needing an oil change, a message will be generated to inform the vehicle owner.
1. Create a Vehicle class that includes make, model, and year
2. Create an Oil class that includes oil type, oil brand, quantity (in quarts), price (per quart), filter brand, and filter cost
3. Create a Date class that includes the month, day, and year
4. Create an Oil Change class that includes the amount of labor (in hours)
a. This class should also include static data members for labor cost ($15.00/hour) and sales tax (7%)
Your program should ask the user to input the vehicle, oil, and date data. It should then calculate the cost of an oil change based on the oil price, qty of oil filter cost, labor costs, and tax.
The vehicle, data, and total price should be written to a file. A user should be able to generate/display a list of all vehicles that are within 1 month (don’t worry about the day) of needing another oil change or are overdue for an oil change.
Your application must include the following:
Constructors
Delegate
Arrays
Abstract Class or Interface
Exception Handling
Static Data Members
Overloaded Operator or overridden method
MessageBox
Inheritance
Data Validation
File Input/Output
Value Added - something not listed above
Solution
public class Car { private readonly Engine engine; public Car(Engine engine) { this.engine = engine; } public Engine Engine { get { return engine; } } } public abstract class Engine { public abstract double Displacement { get; } } public class FlatFourEngine : Engine { public override double Displacement { get { return 2.0; } } } public class InlineSixEngine : Engine { public override double Displacement { get { return 4.0; } } } / Criteria 1: Lazy evaluation of expressions int x = LazyEvaluated.New