IT 206 James Madison University Programming Java Lab Report

Programming Assignment 1/2Scenario:
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.
Page 1 of 4
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.
Your solution may not use any functions or language constructs not covered during IT 106 or this
semester’s IT 206 without prior authorization from your instructor, even if you know other
functions or language constructs. We want everyone to be on the same “playing field”,
regardless of previous programming exposure, and get practice with algorithmic design to solve
problems (the intent of the course). Using something existing not discussed in class does not
give you as much practice as solving the problem yourself. Doing this may lead to a substantial
grade penalty, a grade of zero, or an Honor Code inquiry. When in doubt, ask!
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.
To Do (Check Blackboard for Due Dates):
Programming Assignment 1: Solution Design
1) List and describe the purpose of each class that will be needed to solve this problem
a. You must separately identify (list) and describe the purpose of each class. One or two
sentences per class should be sufficient.
2) Data Definition Class(es) – Create a detailed UML Class Diagram, listing and explaining all class
variables, accessors, mutators, special purpose methods, and constructors associated to each
data definition class.
3) Implementation Class – Create a table that lists all methods that will be used to create the
implementation class. For each method identified, provide the following:
a. A 1-2 sentence describing the purpose of the method
b. A list of the names, data types, and brief description (1-2 sentences) for each input
variable into the method, if there are any
Page 2 of 4
c. The name and data type of the variable to be returned from the method, or void if
nothing will be returned
Note: You do not need to provide any pseudocode. However, you should create a plan for
yourself as to how you will perform the logic for each method. If you do not do this, you will
have great difficulty in completing the solution implementation.
An example format to use for this table is as follows. You can format this table in any way you’d
like, so long as the information is clearly presented. Completing this table correctly will help you
build your documentation and code for your solution implementation.
Method:
Purpose:
Inputs:
Return:
Method:
Purpose:
Inputs:
Return:
getMagazine
The method will allow for the creation and population of a Magazine object
based on user input of a title, cost, and number in stock
none
magazine : Magazine – The Magazine object created and populated from user
input
checkout
The method will allow for the purchase of a magazine. It takes into account the
sales tax that will be charged as part of the cost calculation
magazine : Magazine – The magazine to be purchased
salesTax : double – The sales tax percentage to be charged as part of the
checkout
void
Upload a Word document containing only items above to Blackboard.
Grading Criteria
Requirement
Points
List and describe the class(es) needed to solve the problem
10
Data Definition Class Design – Detailed UML Diagram
40
Implementation Class Design – Table Listing All Methods
50
Programming Assignment 2: 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.
To Blackboard, submit ONLY ONE .zip file containing all of the .java files part of your submission for your
solution implementation. As you are naming your Java files, make sure they are indicative to the
purpose of the file. Do not include your name in the file name or use generic names, such as
Page 3 of 4
Assignment2.java. Your .zip file should contain only the .java files in your solution. Be careful that you
do not submit .class files instead of .java files.
Warning! You must submit ONLY ONE .zip file containing ONLY your .java files. Failure to follow
this instruction precisely will result in a 10 point deduction of the assignment score. No
exceptions!
Why is this important? The goal is to teach you how to properly package your IT solutions into
a “customer-friendly” format while paying attention to “customer” requirements provided to
you.
Your program must compile using jGrasp. Any final program that does not compile, for any reason, will
receive an automatic zero. Other IDEs often place in additional code that you are unaware of, doing too
much of the work for you. You are strongly discouraged from using IDEs other than jGrasp.
Grading Criteria
Requirement
Points
Implementation of object-oriented Java program, using efficient practices, such as the use of
constants, good variable names, information hiding, no redundant code, etc.
70
Appropriate objective-style documentation
10
Appropriate intermediate comments
20
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:
$1400
Page 4 of 4

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER