using System;
public class Car
{
// Properties of Car
public string Make;
public string Model;
public int Year;
// Constructor to initialize car object
public Car(string make, string model, int year)
{
Make = make;
Model = model;
Year = year;
}
// Method to Start the Car
public void Start()
{
[Link](Make + " " + Model + " is starting.");
}
// Method to Stop the Car
public void Stop()
{
[Link](Make + " " + Model + " is stopping.");
}
// Method to Accelerate the Car
public void Accelerate()
{
[Link](Make + " " + Model + " is accelerating.");
}
}
class Program
{
static void Main(string[] args)
{
// --- Create first Car object with user input ---
[Link]("Enter first car Make (e.g., Toyota): ");
string make1 = [Link]();
[Link]("Enter first car Model (e.g., Corolla): ");
string model1 = [Link]();
[Link]("Enter first car Year (e.g., 2021): ");
int year1 = Convert.ToInt32([Link]());
Car car1 = new Car(make1, model1, year1);
[Link]();
[Link]();
[Link]();
[Link](); // Just for space
// --- Create second Car object with user input ---
[Link]("Enter second car Make (e.g., Honda): ");
string make2 = [Link]();
[Link]("Enter second car Model (e.g., Civic): ");
string model2 = [Link]();
[Link]("Enter second car Year (e.g., 2020): ");
int year2 = Convert.ToInt32([Link]());
Car car2 = new Car(make2, model2, year2);
[Link]();
[Link]();
[Link]();
[Link](); // Keep the console window open
}
}