AP® Computer Science A

Free Version

Upgrade subject to access all content

Moderate

HAS-A Terminology

APCSA-WAN1TV

Consider the following classes.

public class Machine 
{ 
    private Controller con;

   // methods not shown
}

public class MachineA extends Machine 
{
    private Part p;

    // methods not shown
}

public class MachineB extends Machine 
{
    // methods not shown
}

Which of the following statements is correct concerning the class relationships?

A

Machine HAS-A MachineA

B

MachineA HAS-A Machine

C

Machine HAS-A Controller

D

MachineA HAS-A MachineB

E

Machine HAS-A Part