Skip to content

This repository contains three class programs: Fan, Car, and Pet. They are built using PysimpleGUI and tkinter. It shows user the necessary output as well as input (e.g. Pet class). See demo at:

Notifications You must be signed in to change notification settings

Irish-C/encap-abstract-classes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Encapsulation and Abstraction in three Classes

Repository Structure

This repository contains three main folders with the following python files:

  1. Fan class folder - Contains the Fan class implementation.
    • Fan.py
    • TestFan.py
    • main.py
  2. Car class folder - Contains the Car class implementation.
    • Car.py
    • Test.py
    • main.py
  3. Pet class folder - Contains the Pet class implementation.
    • Pet.py
    • TestPet.py
    • main.py
  4. images - contains images used for README.md

Getting Started

Installation

To get started, you'll need to have Python 3 installed on your computer. Also, I used VS Code to create and run the program.

Dependencies

To install the necessary modules, open up your terminal or command prompt and type:

  1. For Fan class
    • pip install PysimpleGUI
  2. For Car class and Pet class
    • pip install tkinter
    • pip install ttkthemes

Use

  1. Clone or download the repository.
    • git clone <repository link>
  2. Run python file whichever button available in your IDE or run through terminal.
    • cd <Copy Path>
      • cd means change directory. Find the folder in your IDE and copy path.
    • python <file name>.py
      • this will run your chosen file. In this case, main.py of any folder.
  3. Below will be the next event and instruction. Please follow.

Fan class

  1. The program will show the following output.

preview


Car class

  1. The program will show the following output.
  2. During this, there will be a loading bar that indicates each speed change.

preview


Pet class

  1. The user will be asked to input their Pet's information.
    • Name:
    • Animal Type:
    • Age:
  2. If the user click the save button without inputting. The program will asked them to input the required field.
    • User is allowed to characters and numbers. This is due to unique naming of pet owners.
    • Example: Xander5ive or Luna9th
  3. On the other hand, if user input characters in Age. The program will not accept and ask user to input correctly.
  4. Additionally, in age field, there is age unit included so that user can specify their pet's age.
    • Choices are days, weeks, months, and years
  5. The program will show the following output.

preview


Found a bug?

Contribute

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Contact Me

If you found a bug, you may contact me >> Facebook

About

This repository contains three class programs: Fan, Car, and Pet. They are built using PysimpleGUI and tkinter. It shows user the necessary output as well as input (e.g. Pet class). See demo at:

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages