Question: Given the following code: public class car { private string carName; private double carprice; private string carcolor; private Engine engine; } a . The relation
Given the following code:
public class car
private string carName;
private double carprice;
private string carcolor;
private Engine engine;
a The relation between Engine and Car is called Composition
b There is no relation bietween Engine and Car classes
c The relation between Engine and Car is referred to as ParentChild relationship
d The compiler will report an error since the Engine class in not explicitly defined in the Car class
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
