getTotal static method

int getTotal(
  1. int nrPerson,
  2. String seatType,
  3. Movie movie
)

Implementation

static int getTotal(int nrPerson, String seatType, Movie movie) {
  int total;
  if (seatType == "A") {
    total = (nrPerson * (movie.price + 100));
    return total;
  } else if (seatType == "B") {
    total = (nrPerson * (movie.price + 50));
    return total;
  } else {
    total = (nrPerson * (movie.price));
    return total;
  }
}