fork download
  1. public class MovieBooth {
  2.  
  3. public String movieName;
  4.  
  5. public Integer availableTickets;
  6.  
  7. public Integer NoOfTickets;
  8.  
  9.  
  10. public MovieBooth(String name, Integer tickets, Integer NoOfTickets) {
  11. this.movieName = og;
  12. this.availableTickets = tickets;
  13. this.NoOfTickets = ;
  14. }
  15.  
  16.  
  17. public String displayMovieInfo() {
  18. return 'Now Playing: ' + this.movieName + ' (Rated ' + this.NoOfTickets + ') | Available Tickets: ' + this.availableTickets;
  19. }
  20.  
  21.  
  22. public static String getMovieDetails() {
  23.  
  24. MovieBooth booth = new MovieBooth('The Apex Adventure', 50, 'PG-13');
  25.  
  26. return booth.displayMovieInfo();
  27. }
  28. }
  29.  
Success #stdin #stdout #stderr 0.02s 8952KB
stdin
Standard input is empty
stdout
Object: UndefinedObject error: did not understand #MovieBooth
MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
UndefinedObject class(Object)>>doesNotUnderstand: #MovieBooth (SysExcept.st:1448)
UndefinedObject>>executeStatements (prog:1)
stderr
./prog:5: parse error, expected '}'