Due: 3/9/2020 11:59 PM 3/11/2020 11:59 PM
Write a Java program that does the following jobs.
Step1. Creates a House table with property id (PID), neighborhood, year built, sqft, number of bedrooms, number of bathrooms, and price.
Step2. Reads data from the CSV file and insert the houses into the table created in Step 1.
Step3. Interact with the user, where the user can select one of the following actions.
– (Q) Quit: quit the program
– (A) Add a house
– (C) Calculate average house price
– (P) Print a subset of the houses based on SQFT
– (B) Print a subset of the houses based on numBeds and numBaths
The user can choose one of these actions by typing Q, A, C, P, or R in the console. When adding a house, the user must provide property id (PID), neighborhood, year built, sqft, number of bedrooms, number of bathrooms, and price through the console. When selecting a subset of the houses based on SQFT, a lower bound SQFT value must be provided. When selecting a subset of the houses based on numbed and numBaths, lower bounds must be provided.
Four files are provided with the assignment.
1. AmesHousingDB.java: the main class of this assignment.
2. Database.properties: file for Apache Derby
3. SimpleDataSource.java: file for Apache Derby
4. Ameshousing.csv: sample CSV file for Step 2.
Submit one source file (AmesHousingDB.java). In other words, Database.properties, SimpleDataSource.java, or Ameshousing.csv should not be submitted. In modifying the source file,
1. Do not change the file (class) names. Three Points will be deducted if you have different names. Class name changed due to Canvas (e.g., Classname(1).java, Classname(2).java) is ignored.
2. Fill in your name in the @author section of the comment in each of the files. If you do not, two points will be deducted.