public class Car {
    String carname;
    String model;
    String owner;
    Integer year;

    // Constructor to initialize the Car object
    public Car(String carname, String model, String owner, Integer year) {
        this.carname = carname;
        this.model = model;
        this.owner = owner;
        this.year = year;
    }

    // Method to display car details
    public void show() {
        System.debug('Car name: ' + this.carname);
        System.debug('Model name: ' + this.model);
        System.debug('Owner name: ' + this.owner);
        System.debug('Year: ' + this.year);
    }
}

// Creating an instance of the Car class and initializing it
Car c1 = new Car('Ford Ecosport', 'Diesel', 'Manan', 2024);
c1.show();
