Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your local Community center often hosts charity fund raising dinners. You have been asked to develop an application that tracks ticket sales and the amount


 

Your local Community center often hosts charity fund raising dinners. You have been asked to develop an application that tracks ticket sales and the amount raised for these events. The tickets are sold by groups per table. Each table can sit a maximum of 8 people.

The application should allow a user to first enter the name of the fund-raising event (e.g., "2022 Spring Fund Raiser"). Next, the application should ask how many tables are available for the event. The maximum table capacity is 50. The number of tables available may vary based on the venue the event is being held.

As groups arrive at the ticket counter, the application should prompt the user to enter the number of tickets to be purchased by this group. The application will have no way of knowing in advance how many groups might arrive at the ticket counter. There are 2 different types of tickets- an adult ticket for $100 and a child ticket for $50.

Your object-oriented application must use a data definition class to model one charity event with an implementation class to gather ticket sales information for the charity event. The data definition class should track the charity event name, maximum number of tables available for the event, and the number of tickets (adult and child) sold. Accessors and mutators must be created for all instance variables.

With a completed data definition class, your implementation class must instantiate one object from the data definition class. Your object-oriented application will gather the charity event name and the maximum number of tables available for the event. Then, the application should continuously prompt the user for the number and type of tickets ordered per group, until the user has indicated they are finished. Once all data is entered, the application should print a well-formatted report containing the charity event name, maximum seating capacity (Remember: each table can sit up to 8 people). It should also display the total number of adult and child tickets sold and the total amount raised from the ticket sales.

Other Requirements:

  • Your solution must use object-oriented techniques (No points earned for a procedural solution).
  • Your solution must be designed as a modular solution using methods other than main, with each method performing one task. The main method should contain only a very minimal amount of code, calling methods instead.
  • Your solution must include appropriate constants, constructors, accessors, mutators, and special purpose methods (including a toString() method) with exception handling, as necessary in support of the problem.

Hints:

  • You do not need to use arrays to solve this problem. Keep in mind once you have finished entering the information for one group, it is not necessary to keep the information.
  • Think about what type of validations might be appropriate for this application. Make sure these are all handled.
  • Think about any special purpose methods that might be needed in the data definition class. Special purpose methods are important when using values in instance variables to perform a specific process.

Programming Assignment : Solution Implementation

Write a well-documented, efficient Java program that implements the solution design you identified. Include appropriate documentation as identified in the documentation expectations document.

Example Program Execution:

Enter the name of the charity event:

2022 Spring Fund Raiser

Enter the capacity of the charity event (50 is default):

35

Enter 1 for sale, 2 to quit

1

Enter number of adult tickets:

5

Enter number of child tickets:

3

Enter 1 for sale, 2 to quit

1

Enter number of adult tickets:

7

Enter number of child tickets:

1

Enter 1 for sale, 2 to quit

2

Event: 2022 Spring Fund Raiser

Tickets available: 280

Adult tickets sold: 12

Child tickets sold: 4

Total tickets sold: 16

Total revenue: $140

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Below is an example solution implementation in Java based on the problem description provided java import javautilScanner class CharityEvent private S... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Management for Public Health and Not for Profit Organizations

Authors: Steven A. Finkler, Thad Calabrese

4th edition

133060411, 132805669, 9780133060416, 978-0132805667

More Books

Students also viewed these Programming questions

Question

1. What is the value of Boxs M? (a) 8.49 (b) 58320 (c) 0.058 (d) 3

Answered: 1 week ago

Question

Why are cash and cash equivalents listed first on a balance sheet?

Answered: 1 week ago

Question

What is a Hadley cell? How does it work?

Answered: 1 week ago