In this exercise you will practice:
This is an individual assignment.
Collaboration at a reasonable level will not result in substantially similar code. Students may only collaborate with fellow students currently taking CS 2316, the TA’s and the professor. Collaboration means talking through problems, assisting with debugging, explaining a concept, etc. You should not exchange code or write code for others.
Notes:
You want to provide a convenient interface to the attraction data you mined from the web in the last homework.
Create a GUI application in a Python source file named attraction_gui.py
that displays the attraction data in the attraction database you created in the previous homework.
You may use the schema and data you created in hw3, or you may use these:
In either case, make sure your MySQL server is running and execute these commands on your operating system command line:
mysql -u root < attraction-schema.sql
mysql -u root < attraction-data.sql
Your application may assume that there is a MySQL database named attraction
that has been created and populated using the set-up scripts above. attraction_gui.py
should display a login screen that gathers MySQL database user credentials to connect to this database and display a main screen as described below.
The main screen should
attraction
table.The “Attractions in City” dialog should
attraction
table that are in the city selected on the main screen.The “Attraction” dialog should
You’ll need to install PyMySQL with conda:
$ conda install mymysql
Example code is your friend. These examples will be particularly helpful:
Submit your attraction_gui.py
, attraction-schema.sql
and attraction-data.sql
files on Canvas. After you turn in your files, make sure to check that you have submitted the correct files that you intended to. It is highly recommended that you submit the assignment early and often in order to avoid incorrect/incomplete submissions near the deadline.
Good luck!