Write the definition for a constructor for the class


Write the definition for a constructor for the class Tournaments, whereby the variables eventName and numGames are initialized according to parameters, eventName and numGames, respectively. include means for any state variables that need to be updated. To do so, use a third parameter to distinguish whether an event is basketball or volleyball, so that the state variables are correctly updated. What is the value to which monthHeld is initialized? (language is Java Eclipse)

class Tournaments {

          private static int numBasketball;

          private static int numVolleyball;

          public String eventName;

          public int numGames;

          public String monthHeld;

 

          // constructors would go here

          public static int getNumbBasketball( ) {

                    return numBasketball;

          }

          public static int getNumbVolleyball( ) {

                    return numVolleyball;

         }

          public String idLevelOfPlay( ) {

                    String x = null;

                    return x;

          }

}

Solution Preview :

Prepared by a verified Expert
Business Management: Write the definition for a constructor for the class
Reference No:- TGS01382635

Now Priced at $30 (50% Discount)

Recommended (93%)

Rated (4.5/5)