fork download
  1. public class MovieBooth {
  2.  
  3. public String movieName;
  4.  
  5.  
  6. public Integer availableTickets;
  7.  
  8. public Integer NoOfTickets;
  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.  
  27. return booth.displayMovieInfo();
  28. }
  29. }
  30.  
Success #stdin #stdout #stderr 0.01s 8940KB
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:6: parse error, expected '}'