Question
GUI Programming Creating a Kilometer to Miles Converter Lab Assignment Objectives Understand the basics of tkinter GUI development. Based on an informal application specification be
GUI Programming
Creating a Kilometer to Miles Converter
Lab Assignment Objectives
- Understand the basics of tkinter GUI development.
- Based on an informal application specification be able to develop a tkinter GUI program that contains one or more Label widgets.
- Be able to prompt user for input to a GUI application using a messagebox.
- Obtain user input into a GUI application that can be used for event driven selection.
- Be able to develop a tkinter GUI program that supports event-based widgets.
- Develop a tkinter GUI program that maintains application state using a Canvas widget and/or a Frame widget to pack other widgets.
Understand the Application
For this GUI app you will create a kilometer to miles distance converter. Specifically we will write a class that will implement converting distances in kilometers to miles.
Implement a GUI app that contains:
- a text entry for the user to provide a kilometer input
- two buttons labeled "Convert" and "Quit"
Invoking the app, the user will be able to supply a kilometer value into the kilometer entry widget prompt.
When the user clicks the first button, Convert, the kilometers to miles conversion result will be displayed in an information dialog box. When the user clicks the second button, Quit, the app closes.
The Program Specification
Write a program that converts distances in kilometers to miles. The task for this lab is to develop an Object Oriented GUI application as a class that encapsulates the implementation of converting distances in kilometers to miles. Display the result in an info dialog box. Format floating point values to 2 decimal places.
Testing Specification
Create an instance of the Kilometer Converter GUI class to demonstrate your app.
Input Error Checking: Validate user Input into the entry widget (i.e. a valid kilometer value). Do check that the button clicked performs the correct action (i.e. the convert button invokes the callback function for the conversion, the quit button closes the app).
Test Run Requirements: Provide a screenshot of your GUI program console display.
What to Turn In
Deliverables: Submit 2 files:
- Your source code solution for your GUI app: yournameLab6.py (Note: Use YOUR name).
- A screenshot of your GUI console display. This file can be of type .png, .docx. jpg. : yournameLab6demo
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