Professional Documents
Culture Documents
For this Project, we have been tasked with creating a program for a theme park called
Fantasialand.
Decomposition
Use Tkinter to create a GUI with various user inputs, eg:
● Ticket purchase
● Number and detail of attending customer
● Tickets stored on a txt file with a random number assigned to each ticket. (Use
random module)
● Display each ticket purchased on the screen after each purchase
Strategy/Desired Outcomes
To make this program, I intend to use Tkinter to make screen designs, and use the entry
function to allow the user to input their own parameters within the GUI. Once they have
entered this, I intend to save all of this information to a text file. This means that I can
collect a database of purchases, for ease of access.
If the user has entered valid purchase details, based on the type and quantity of tickets, the
program will calculate the order price, and then display everything to the GUI. I intend to do
this using f strings, so that user defined variables can be entered into Tkinter’s “Label”
function. The user will then have the option to print the ticket, and copy the randomly
generated 4 digit security key to the clipboard
Design Option to
Save ticket Print ticket
to screen Search
to .csv file
record for
Start tickets
Option to
No print to
Purchase printer
tickets Is the
number
already
taken? Get random
User input: ticket
Type of number
Yes
Ticket
Flowchart
Launch
Program
Pseudocode
Launch program
Ticket number and Checks against data Stores access time and Prints ticket to screen
security code base if code is valid data to csv file
Data Dictionary
Implementation
This is the txt file that all purchases are saved to. This includes all the purchase
information, and is written to when the user submits their purchase.
Screen Design
This is the Main Gui menu. This includes the option to start your purchase.
This is the Ticket purchase menu. It allows you to enter the date of your visit,
the number of Adult tickets and the number of Child tickets. Once this is
complete, you can confirm the purchase.
This is the Ticket receipt menu. This shows all the user entered parameters, as
well as the price that the program has calculated. It will also generate an
original ticket ID, and a 4 digit security key. The first of the buttons will copy
the security key to the clipboard, and the second will take you back to the main
menu.
Evaluation
Overall, I feel like I have met the brief. I have created a program with a GUI
using Tkinter, which allows the user to specify date, ticket type, and quantity of
ticket you intend to purchase. The program also calculates the price, and
displays all the purchase parameters, including ticket ID and security code, and
saves them to a text file. To improve the program, I could add a search
function, which would allow the user to enter their Ticket ID, and the
corresponding security code, and have access to their visit information, with
the option to print to the printer. To make the code easier to read, I could add
comments, to allow anyone to easily understand what each bit of the code
does.