COMPUTER PROGRAMMING 2

Course Description


The course covers advanced topics in computer programming using general-purpose programming language to solve computing problems. The emphasis of this course is to train students to design, implement, test, and debug programs intended to solve computing problems by implementing advanced programming constructs.


Specification, this course will use the Python programming language to introduce students to advanced topics in computer programming. It will include topics in object-oriented programming (OOP), advanced string manipulation using a regular expression (regex), accessing files and databases, data analysis and data visualization, and graphical user interface (GUI).

JOHN LEO D. ECHEVARIA

Bachelors of Science in Computer Science 

Specialization Track in Software Engineering I

Growing up in Manila, I was always fascinated by the power of technology and its ability to change the world. Back in high school, I had the opportunity to join a contest and create a website for our school publishing team, and to my surprise, we were able to reach regionals. That was my first introduction to programming and since then, I fell in love with it. So, when it came time to choose a college, I knew that I wanted to pursue a degree in computer science. But I also knew that to truly excel in this field, I needed to immerse myself in a new environment where I could focus on my studies and gain hands-on experience.


That's why I made the decision to move to Quezon Province to attend college. It's been a big transition, but I'm excited to be here and to be taking classes that will help me achieve my goal of becoming a competent computer science graduate. I'm determined to work hard and make the most of this opportunity.


When I'm not studying, I love to spend my time painting and creating mini programming projects. I believe that art and technology go hand in hand, and I find that these hobbies help me stay creative and inspired. They also let me pursue my interest in both fields and make a balance between the technical and creative side of my life. I also believe that nothing is impossible with hard work and determination, and I'm excited to see what the future holds for me.

FacebookInstagramLinkedInGitHub

Course Learning Outcomes and Performance Indicators 

FINALS COURSE OUTCOMES

COURSE OUTCOME PERFORMANCE INDICATOR

EXPECTATIONS

I expect this course to teach me how to integrate object-oriented programming (OOP), databases, and graphical user interfaces (GUI) in Python. With these skills, I aim to create functional programs that efficiently utilize OOP principles, perform CRUD operations in databases using SQL, and have user-friendly GUIs. Ultimately, I anticipate building versatile programs that meet various needs and provide a seamless user experience.

APPLICATION

I successfully applied the course outcomes by developing Golden Mane, an object-oriented GUI program for an ATM. The program effectively utilizes a database to store and manage Account and Transaction information. It incorporates the fundamental CRUD principles, allowing for creating, reading, updating, and deleting data in various tables within the database. Golden Mane provides a comprehensive and user-friendly solution for ATM operations, showcasing the integration of OOP, databases, and GUI in a functional program.

Finals Course Outcome Indicator Output

Golden Mane is a comprehensive Object-Oriented Python GUI program designed to replicate an online banking interface for an ATM. The program utilizes MySQL as the underlying database to store and manage user account information and transaction data. Users are required to log in using their credentials and can perform essential banking operations such as depositing and withdrawing funds. They can also access a transaction history feature to view their previous transactions.

To enhance the user experience, Golden Mane incorporates ttkbootstrap, a popular Python library that offers customized and modern GUI elements. This ensures that the interface is visually appealing, user-friendly, and aligned with current design trends. The combination of object-oriented programming, MySQL integration, and the utilization of ttkbootstrap results in a robust and intuitive program that simulates an authentic online banking experience.

About the Database:

This database is called "ATM DATABASE" and is designed to store information related to an ATM system. It consists of three tables: "users," "accounts," and "transactions."


The "users" table stores information about ATM users, including their unique "userID," "surname," "fstname" (first name), "homeadd" (home address), and "phonenum" (phone number). The "userID" column serves as the primary key for this table


The "accounts" table holds data regarding the user's accounts. It includes columns such as "account_no" (auto-incremented account number, serving as the primary key), "acctype" (account type), "userID" (foreign key referencing the "userID" column in the "users" table), "balance" (account balance), "withdrawal_limit" (maximum withdrawal limit), "withdrawal_freq" (withdrawal frequency), and "userpasswd" (user password).


The "transactions" table stores details about the transactions made by the users. It includes columns such as "trans_type" (transaction type), "amount" (transaction amount), "trans_date" (transaction date), and "account_no" (foreign key referencing the "account_no" column in the "accounts" table).


Overall, this database allows for the management of ATM users, their associated accounts, and the recording of transaction information. The relationships between the tables are established using primary key and foreign key constraints to ensure data integrity.

ATM_DB_Manager.py:

About the ATM_DB_Manager Class:

The provided Python program handles MySQL operations for the Golden Mane ATM GUI program. It utilizes the mysql.connector module to establish a connection to the MySQL database. Here's an overview of the program's functionality:

The ATM_DB_Manager Class contains the following methods:

ATM_GUI.py:

About ATM_GUI.py:

Python script that implements a simple ATM (Automated Teller Machine) system using the Tkinter library for GUI (Graphical User Interface) components. It consists of three main classes: ATM_Login, ATM_Register, and ATM_GUI.

The ATM_Login class represents the login window of the ATM system. It provides a form for users to enter their user ID and password. Upon clicking the login button, the entered credentials are validated against a database using the ATM_DB_Manager class. If the login is successful, the user is redirected to the ATM_GUI class, which represents the main ATM interface. Otherwise, an error message is displayed.

The ATM_Register class is responsible for the user registration process. It displays a registration form where users can enter their personal information, including name, address, phone number, user ID, password, and initial deposit. The entered data is validated, and if all the fields are filled correctly, the user's information is stored in the database using the ATM_DB_Manager class.

The ATM_GUI class represents the main interface of the ATM system. It displays the user's account information, such as their name, balance, and account type. It also provides options for various ATM operations, such as withdrawal, deposit, and balance inquiry. These operations are implemented in the OptionsFrame class.

The code utilizes the ttkbootstrap library to enhance the appearance of the GUI components. It also uses the messagebox module from Tkinter to display error and information messages.

Overall, the code sets up a basic ATM system with login, registration, and account management functionality. It demonstrates the use of Tkinter for building a GUI application and database operations for storing and retrieving user information.

GitHub

Program Demonstration

Deconstructing the Program Interface:

The Golden Mane ATM GUI consists of three main components: the login interface, register interface, and the main functions interface.

Login Interface:

When the program starts, the user is presented with the login interface. Here, they can enter their UserID in the first entry field. For security purposes, the password entered in the second entry field is automatically masked with asterisks. If the user enters incorrect values in either the UserID or password fields, a popup notification will inform them of the error.

Upon clicking the login button, the login interface is minimized, and the main functions interface is displayed. The main functions interface provides various options for ATM operations, such as withdrawing money, checking account balance, transferring funds, etc.

In the case that the user is not yet registered in the system, they can click the register button on the login interface. This action opens the register interface, where they can create a new account by providing the necessary personal and account information.

Register Interface:

The register interface in the Golden Mane ATM GUI facilitates the process of creating a new user account, which is automatically recorded in the MySQL database. This interface is designed with two distinct sections, each serving a specific purpose:

By splitting the interface into these two sections, the register interface provides a clear and organized layout, making it easy for users to input their personal information and configure their account settings. Once the user completes the registration process by entering the required details, their account information is securely stored in the MySQL database, allowing for future access and management.

The Main Functions Interface:

Once the user successfully logs in and opens their account in the login screen, they will be directed to the main functions interface.

The main functions interface is divided into two sections. On the left side, the interface displays essential information about the user's account. This includes a personalized greeting to the user, the current balance in their account, and their account type. To update the displayed account information, a refresh button is conveniently located at the bottom right corner of the interface.

On the right side of the interface, users will find a set of main function buttons. These buttons provide quick access to key operations. The available buttons include:

Deposit and Withdrawal Interface:

When the user clicks either the deposit or withdrawal button in the main functions interface, a number pad-style interface will appear. This interface allows the user to input the desired amount they want to deposit or withdraw by clicking on the corresponding numbers.

Once the user has entered the amount, they have two options:

If the user chooses to withdraw, the program will perform a series of verifications to ensure security and prevent unauthorized access. These verifications include:

These steps and verifications are implemented by banks as a security measure to protect against potential hacking incidents, they are essential for maintaining the security of the user's account and preventing unauthorized access or suspicious activity.

Transaction History Interface:

The transaction history interface in the Golden Mane ATM GUI is designed as a table that displays a comprehensive list of all the transactions associated with the user's account. This table provides essential details about each transaction, including:

By presenting these key details in a structured table format, the transaction history interface offers users a clear and organized overview of their financial activities. It serves as a reliable record that enables users to review and monitor their past transactions easily.


Finals Output Reflection

Throughout this course, I had clear expectations of learning how to integrate object-oriented programming (OOP), databases, and graphical user interfaces (GUI) in Python. I aimed to acquire the skills necessary for developing functional programs that effectively utilized OOP principles, performed CRUD operations in databases using SQL, and featured user-friendly GUIs. Looking back, I am pleased to say that these expectations were met and I have gained valuable insights and practical knowledge in these areas.
To apply the course outcomes, I successfully developed a program called Golden Mane, which serves as an object-oriented GUI solution for an ATM system. This project enabled me to leverage the power of OOP by creating classes and utilizing their inheritance, encapsulation, and polymorphism features. By implementing a database, I effectively stored and managed Account and Transaction information, allowing for seamless data retrieval and manipulation. The integration of CRUD operations within the program demonstrated my understanding of database interactions using SQL statements.
One of the notable challenges I encountered during the development process was maintaining code organization. As tkinter, the GUI library used in Python, tends to result in lengthy code, it became crucial to find ways to keep the codebase organized and manageable. In response, I employed strategies such as creating separate classes, files, and libraries to compartmentalize the code logically. This approach significantly improved the maintainability and readability of the project, making it easier to navigate and troubleshoot.
Looking forward, the knowledge and skills gained from this course will undoubtedly benefit me in my future endeavors. I now possess the ability to develop versatile programs that integrate OOP principles, interact with databases using SQL, and feature user-friendly GUIs. These skills will enable me to create robust and efficient software solutions that cater to diverse needs and provide an intuitive user experience.
In conclusion, this course has been instrumental in expanding my proficiency in integrating OOP, databases, and GUI in Python programming. Through the development of the Golden Mane ATM program, I have successfully applied the course outcomes, overcome challenges related to code organization, and developed a solid foundation for building functional and user-friendly applications. I am excited to further explore and refine these skills as I continue my programming journey.