title: Ticket Price Calculation
body: <p>Create a class Ticket with the following private variables</p>
  
  <pre><code>int ticketid;
  int price;
  static int `availableTickets`;
  </code></pre>
  
  <p>Include getters and setters methods in the Ticket class.
  Available Tickets should hold only positive value. Zero and negative values are not allowed.(This logic should be checked inside the corresponding setter method)
  Write the following method in the Ticket class:</p>
  
  <pre><code>public int calculateTicketCost(int no_of_tickets) 
  </code></pre>
  
  <p>— this method should check the ticket availability, if the tickets are available, reduce the <code>no_of_tickets</code> from <code>available_Tickets</code> and calculate the total amount as <code>nooftickets*price</code> and return the total amount. If the tickets are not available, this method should return -1.
  Write a main method in the Main class to test the application.</p>
  
  <p>Sample input and output</p>
  
  <pre><code>Enter no of bookings:
  2
  Enter the available tickets:
  25
  Enter the ticket id:
  123
  Enter the price:
  100
  Enter the no of tickets:
  5
  Available tickets: 25
  Total amount:500
  Available ticket after booking:20
  Enter the ticket id:
  124
  Enter the price:
  100
  Enter the no of tickets:
  2
  Available tickets: 20
  Total amount:200
  Available ticket after booking:18
  </code></pre>