Answered step by step
Verified Expert Solution
Link Copied!

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/ bFDmx6MY Remove the spaces to see.
Modify the design and code an updated version of JDBC - Project 1 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 1.
Add a field, accessor, and mutator to the Arena class from JDBC - Project 1 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 re-pompt the user if a menu option is selected that is not listed
Option 1: Build or re-build a database named ArenasDB that contains contain the table named Arenas from Project 2. 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 re-build 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 2- Define a method that will use SQL statements to display all of the rows and columns of the Arenas table to the console.
Option 3- 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 4- Define a method that that will use SQL statements to display the average capacity for all arenas in the Arenas table
Option 5 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 2000. Sort the data in ascending order by the Year each arena was opened.
Option 6- Define a method that will use SQL Statements to display the Total Attendance for all Arenas in California
Option 7 Exit the program
After each valid operation is done, prompt the user to re-display the list of actions, if the user chooses not to re-display the menu, then exit the program.
You must use object-oriented 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 try/catch 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 and/or Tenant classes.
Document your source code with single and multi-line comments

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

What is the purpose of a code of conduct ?

Answered: 1 week ago

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago