Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please see the code you need to alter here: paste bin . com / bFDmx 6 MY Remove the spaces to see. Modify the design
Please see the code you need to alter here: paste bin com bFDmxMY Remove the spaces to see.
Modify the design and code an updated version of JDBC Project to be a program that will process information for some of the top indoor arenas in the United States using JavaDB with PostgreSQL. Arena profiles contain information about the venue, as well as current major Tenant sports team that plays home games in the indoor arena. Arena profiles will be read from the text file IndoorArenasTwo.txt Download the attached text file.
The text file contains Arena Information in the following order:
Venue Name
City
State
Maximum Capacity
Year Opened
Team Name
Sport
League
Attendance
Instructions
The Tenant class will remain unmodified from the Review Project and JDBC Project
Add a field, accessor, and mutator to the Arena class from JDBC Project to accommodate the attendance
Demonstrate your design in a demo program that will use loops to read the Arena information from the text file
The demo program will also include methods that will do the following:
Display a menu containing seven options for activity for the Arenas Database and validate input to repompt the user if a menu option is selected that is not listed
Option : Build or rebuild a database named ArenasDB that contains contain the table named Arenas from Project Add an Integer field to the Arenas table that will hold the Attendance data read from the file. If the table already exists, call a method to drop the tables, then rebuild the Arenas table
Each group of lines of the IndoorArenasTwo.txt file will be used to create an instance of an Arena object, and the information from the instance of that object will be used to create the Rows of the Arenas table
Define methods to run the following queries See Sample output section in this document:
Option Define a method that will use SQL statements to display all of the rows and columns of the Arenas table to the console.
Option Define a method that will use SQL statements to display all of the rows and columns of the Arenas table that contain Basketball tenants
Option Define a method that that will use SQL statements to display the average capacity for all arenas in the Arenas table
Option Define a method that will use SQL Statements to display the Venue and Year Opened for all arenas in the Arenas table for all arenas after Sort the data in ascending order by the Year each arena was opened.
Option Define a method that will use SQL Statements to display the Total Attendance for all Arenas in California
Option Exit the program
After each valid operation is done, prompt the user to redisplay the list of actions, if the user chooses not to redisplay the menu, then exit the program.
You must use objectoriented principles in this project. All data in the Arena and Tenants classes should remain encapsulated.
Once again, The IndoorArenasTwo.txt file should not be edited. Your program should be able to process the text file as is
Be sure to throw FileNotFoundExceptions on any method that uses the IndoorArenas.txt file, and use trycatch blocks to catch any SQL Exceptions within methods
A separate demo program must be used to demonstrate your classes. Demo code must not be added to the Arena andor Tenant classes.
Document your source code with single and multiline comments
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started