Question: Identify the object - oriented principle applied in this code. public class Car { private String model; private int year; / / Constructors and other
Identify the objectoriented principle applied in this code.
public class Car
private String model;
private int year;
Constructors and other methods
public void startEngine
Start the car's engine
a Code to an interface rather than to an implementation.
b Encapsulate what varies.
c None
d Classes are about behavior and functionality.
e Each class in your application should have only one reason to change.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
