Class Tunapalooza


  • public class Tunapalooza
    extends ExampleFD
    It solves a simple logic puzzle about music concert.
    Version:
    4.8

    Tim and Keri have a full day ahead for themselves as they plan to see and hear everything at Tunapalooza '98, the annual save-the-tuna benefit concert in their hometown. To cover the most ground, they will have to split up. They have arranged to meet during four rock band acts (Ellyfish, Korrupt, Retread Ed and the Flat Tires, and Yellow Reef) at planned rendezvous points (carnival games, information booth, mosh pit, or T-shirt vendor). Can you help match each band name with the type of music they play (country, grunge, reggae, or speed metal) and Tim and Kerri's prearranged meeting spot while they play?

    1. Korrupt isn't a country or grunge music band.

    2. Tim and Kerri won't meet at the carnival games during Ellyfish's performance.

    3. The pair won't meet at the T-shirt vendor during the reggae band's show.

    4. Exactly two of the following three statements are true: a) Ellyfish plays grunge music. b) Tim and Kerri won't meet at the information booth during a performance by Retread Ed and the Flat Tires. c) The two friends won't meet at the T-shirt vendor while Yellow Reef is playing.

    5. The country and speed metal acts are, in some order, Retread Ed and the Flat Tires and the act during which Tim and Kerri will meet at the mosh pit.

    6. The reggae band is neither Korrupt nor the act during which Tim and Kerri will meet at the information booth.

    Determine: Band name -- Music type -- Meeting place

    Given solution :

    1 Ellyfish, grunge, vendor 2 Korrupt, metal, mosh 3 Retread, country, information 4 Yellow , reggae, carnival

    • Constructor Detail

      • Tunapalooza

        public Tunapalooza()
    • Method Detail

      • model

        public void model()
        Description copied from class: ExampleFD
        It specifies a standard way of modeling the problem.
        Specified by:
        model in class ExampleFD
      • main

        public static void main​(java.lang.String[] args)
        It executes the program to solve this simple logic puzzle.
        Parameters:
        args - no arguments are used.