A Barbershop Quartet is a group of four singers: a lead, a tenor, a bass, and a baritone.  These four singers harmonize to produce a purely American form of music developed in the 19th century.  Consider the incomplete class definitions below.   public class BarberShopQuartet {    public BarberShopQuartet()    {       Tenor highSinger = new Tenor();       Baritone bari = new Baritone();       Lead melody = new Lead();       Bass lowSinger = new Bass();       System.out.println(“Quartet created.”);    } } ______________________________________________________________________________   public class Singer {    public Singer()    {       System.out.println(“Singing...”);    } } ______________________________________________________________________________   public class Tenor extends Singer {    public Tenor()    {       System.out.println(“Singing...the high notes”);    } } ______________________________________________________________________________   public class Baritone extends Singer {    public Baritone()    {       System.out.println(“Singing...harmonizing with the lead”);    } } ______________________________________________________________________________       public class Lead extends Singer {    public Lead()    {       System.out.println(“Singing...the melody and providing the    emotion”);    } } ______________________________________________________________________________   public class Bass extends Singer {    public Bass()    {       System.out.println(“Singing...the very low notes”);    } } Which of the following IS-A, HAS-A relationships is true?   A. A Baritone has-a BarberShopQuartet.   B. A Singer has-a Lead.   C. A BarberShopQuartet is-a Singer.   D. A Singer has-a BarberShopQuartet.     E. A Tenor is-a Singer.

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 30VE: A(n) ____________ is one instance or variable of a class.
icon
Related questions
Question

A Barbershop Quartet is a group of four singers: a lead, a tenor, a bass, and a baritone.  These four singers harmonize to produce a purely American form of music developed in the 19th century.  Consider the incomplete class definitions below.

 

public class BarberShopQuartet

{

   public BarberShopQuartet()

   {

      Tenor highSinger = new Tenor();

      Baritone bari = new Baritone();

      Lead melody = new Lead();

      Bass lowSinger = new Bass();

      System.out.println(“Quartet created.”);

   }

}

______________________________________________________________________________

 

public class Singer

{

   public Singer()

   {

      System.out.println(“Singing...”);

   }

}

______________________________________________________________________________

 

public class Tenor extends Singer

{

   public Tenor()

   {

      System.out.println(“Singing...the high notes”);

   }

}

______________________________________________________________________________

 

public class Baritone extends Singer

{

   public Baritone()

   {

      System.out.println(“Singing...harmonizing with the lead”);

   }

}

______________________________________________________________________________

 

 

 

public class Lead extends Singer

{

   public Lead()

   {

      System.out.println(“Singing...the melody and providing the   

emotion”);

   }

}

______________________________________________________________________________

 

public class Bass extends Singer

{

   public Bass()

   {

      System.out.println(“Singing...the very low notes”);

   }

}

Which of the following IS-A, HAS-A relationships is true?

  A.

A Baritone has-a BarberShopQuartet.

  B.

A Singer has-a Lead.

  C.

A BarberShopQuartet is-a Singer.

  D.

A Singer has-a BarberShopQuartet.

 

  E.

A Tenor is-a Singer.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr