Lab 20

Concert Promotion

 

Objective:

 

Write a class that keeps track of concert promotion information

 

Example Dialog:

 

Welcome to the Concert Promotion tool!

Currently the concert featuring the band No name yet

Has sold 0 tickets by phone

Has sold 0 tickets at the venue

And has grossed $0.0

What would you like to do?

Enter 1: To change name

Enter 2: To change ticket by phone price

Enter 3: To change ticket at venue price

Enter 4: To add tickets by phone

Enter 5: To add tickets at the venue

Enter 6: To find out how many tickets are remaining

Enter 7: To find out how many total tickets have been sold

Enter 8: To change the venue's capacity

Enter 9: To start a new concert

Enter 0: To Quit

 

1

Enter the name of the band

Bob's Band

Currently the concert featuring the band Bob's Band

Has sold 0 tickets by phone

Has sold 0 tickets at the venue

And has grossed $0.0

What would you like to do?

Enter 1: To change name

Enter 2: To change ticket by phone price

Enter 3: To change ticket at venue price

Enter 4: To add tickets by phone

Enter 5: To add tickets at the venue

Enter 6: To find out how many tickets are remaining

Enter 7: To find out how many total tickets have been sold

Enter 8: To change the venue's capacity

Enter 9: To start a new concert

Enter 0: To Quit

 

8

Enter the new capacity

500

Currently the concert featuring the band Bob's Band

Has sold 0 tickets by phone

Has sold 0 tickets at the venue

And has grossed $0.0

What would you like to do?

Enter 1: To change name

Enter 2: To change ticket by phone price

Enter 3: To change ticket at venue price

Enter 4: To add tickets by phone

Enter 5: To add tickets at the venue

Enter 6: To find out how many tickets are remaining

Enter 7: To find out how many total tickets have been sold

Enter 8: To change the venue's capacity

Enter 9: To start a new concert

Enter 0: To Quit

 

2

Enter the new price by phone

5

Currently the concert featuring the band Bob's Band

Has sold 0 tickets by phone

Has sold 0 tickets at the venue

And has grossed $0.0

What would you like to do?

Enter 1: To change name

Enter 2: To change ticket by phone price

Enter 3: To change ticket at venue price

Enter 4: To add tickets by phone

Enter 5: To add tickets at the venue

Enter 6: To find out how many tickets are remaining

Enter 7: To find out how many total tickets have been sold

Enter 8: To change the venue's capacity

Enter 9: To start a new concert

Enter 0: To Quit

 

3

Enter the new price at the venue

10

Currently the concert featuring the band Bob's Band

Has sold 0 tickets by phone

Has sold 0 tickets at the venue

And has grossed $0.0

What would you like to do?

Enter 1: To change name

Enter 2: To change ticket by phone price

Enter 3: To change ticket at venue price

Enter 4: To add tickets by phone

Enter 5: To add tickets at the venue

Enter 6: To find out how many tickets are remaining

Enter 7: To find out how many total tickets have been sold

Enter 8: To change the venue's capacity

Enter 9: To start a new concert

Enter 0: To Quit

 

4

Enter a number of tickets to add by phone

200

Currently the concert featuring the band Bob's Band

Has sold 200 tickets by phone

Has sold 0 tickets at the venue

And has grossed $1000.0

What would you like to do?

Enter 1: To change name

Enter 2: To change ticket by phone price

Enter 3: To change ticket at venue price

Enter 4: To add tickets by phone

Enter 5: To add tickets at the venue

Enter 6: To find out how many tickets are remaining

Enter 7: To find out how many total tickets have been sold

Enter 8: To change the venue's capacity

Enter 9: To start a new concert

Enter 0: To Quit

 

5

Enter a number of tickets to add at the venue

200

Currently the concert featuring the band Bob's Band

Has sold 200 tickets by phone

Has sold 200 tickets at the venue

And has grossed $3000.0

What would you like to do?

Enter 1: To change name

Enter 2: To change ticket by phone price

Enter 3: To change ticket at venue price

Enter 4: To add tickets by phone

Enter 5: To add tickets at the venue

Enter 6: To find out how many tickets are remaining

Enter 7: To find out how many total tickets have been sold

Enter 8: To change the venue's capacity

Enter 9: To start a new concert

Enter 0: To Quit

 

4

Enter a number of tickets to add by phone

1000

The concert is sold out!

Currently the concert featuring the band Bob's Band

Has sold 200 tickets by phone

Has sold 200 tickets at the venue

And has grossed $3000.0

What would you like to do?

Enter 1: To change name

Enter 2: To change ticket by phone price

Enter 3: To change ticket at venue price

Enter 4: To add tickets by phone

Enter 5: To add tickets at the venue

Enter 6: To find out how many tickets are remaining

Enter 7: To find out how many total tickets have been sold

Enter 8: To change the venue's capacity

Enter 9: To start a new concert

Enter 0: To Quit

 

0

Lab Report Questions:

  1. Describe encapsulation.
  2. What is the purpose of an accessor?
  3. What is the purpose of a mutator?

Finally:

Upload Concert.java and ConcertPromoter.java file to the dropbox