Programming Languages: Project 5

Ticketmaster

In this assignment, you will explore some fun and exciting Java classes and ways of using them. You will write a program to manage the reservations for a performance at a theater (similarly to how Ticketmaster works). To keep things simple, there is only one performance, and the theater has a single row of seats that are numbered with increasing integers starting from zero.

Read this entire document before you start working so you can get a feel for how the classes fit together.

Getting Started

Classes to Edit

Sample Run

Enter theater size: 20

Enter command: reserve kirlin 6
Made reservation: [Reservation for kirlin: seats 0 through 5]
Theater now looks like: [xxxxxx--------------]

Enter command: reserve sanders 4
Made reservation: [Reservation for sanders: seats 6 through 9]
Theater now looks like: [xxxxxxxxxx----------]

Enter command: cancel kirlin
Reservation canceled.
Theater now looks like: [------xxxx----------]

Enter command: reserve seaton 3
Made reservation: [Reservation for seaton: seats 0 through 2]
Theater now looks like: [xxx---xxxx----------]

Enter command: reserve mouron 12
Could not make reservation.

Enter command: reserve gottlieb 7
Made reservation: [Reservation for gottlieb: seats 10 through 16]
Theater now looks like: [xxx---xxxxxxxxxxx---]

Enter command: lookup sanders
[Reservation for sanders: seats 6 through 9]

Enter command: cancel sanders
Reservation canceled.
Theater now looks like: [xxx-------xxxxxxx---]

Enter command: reserve mouron 12
Could not make reservation.

Enter command: cancel gottlieb
Reservation canceled.
Theater now looks like: [xxx-----------------]

Enter command: reserve mouron 12
Made reservation: [Reservation for mouron: seats 3 through 14]
Theater now looks like: [xxxxxxxxxxxxxxx-----]

Enter command: end

Grading

Solutions should be:

Turn-in instructions