Sunday, October 1, 2023

Tic Tac Toe Game in C++

Tic Tac Toe in C++

 A simple tic tac toe program in C++ programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada




09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing

#include <iostream> using namespace std; char board[3][3] = {{'1','2','3'}, {'4','5','6'}, {'7','8','9'}}; int player = 1; char mark; void draw_board() { cout << "Tic Tac Toe Game in C++" << endl; for(int i = 0; i < 3; i++) { for(int j = 0; j < 3; j++) { cout << board[i][j] << " "; } cout << endl; } } void player_turn() { int choice; if(player % 2 == 1) { cout << "Player 1 turn (X): "; } else { cout << "Player 2 turn (O): "; } cin >> choice; switch(choice) { case 1: mark = 'X'; board[0][0] = mark; break; case 2: mark = 'X'; board[0][1] = mark; break; case 3: mark = 'X'; board[0][2] = mark; break; case 4: mark = 'X'; board[1][0] = mark; break; case 5: mark = 'X'; board[1][1] = mark; break; case 6: mark = 'X'; board[1][2] = mark; break; case 7: mark = 'X'; board[2][0] = mark; break; case 8: mark = 'X'; board[2][1] = mark; break; case 9: mark = 'X'; board[2][2] = mark; break; default: cout << "Invalid move" << endl; player_turn(); } } bool game_over() { // Check rows for(int i = 0; i < 3; i++) { if(board[i][0] == board[i][1] && board[i][1] == board[i][2]) { return true; } } // Check columns for(int j = 0; j < 3; j++) { if(board[0][j] == board[1][j] && board[1][j] == board[2][j]) { return true; } } // Check diagonals if(board[0][0] == board[1][1] && board[1][1] == board[2][2]) { return true; } if(board[0][2] == board[1][1] && board[1][1] == board[2][0]) { return true; } return false; } int main() { draw_board(); while(!game_over()) { player_turn(); draw_board(); player++; } if(player % 2 == 1) { cout << "Player 2 wins!" << endl; } else { cout << "Player 1 wins!" << endl; } return 0; }

Friday, September 29, 2023

Hello World Using a Class in Python

Hello World Using a Class in Python

 A simple hello world program using a class in Python programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada




09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.



Program Listing

class HelloWorldPrinter:
    def print_hello_world(self):
        print("Hello, World! in Python Programming")

# Create an instance of the class
printer = HelloWorldPrinter()

# Call the method to print the message
printer.print_hello_world()




Wednesday, September 27, 2023

System Requirements of Microsoft Windows 8.1 Operating System

Hardware Requirements of Microsoft Windows 11 Operating System

How To Become a Visual Basic Programmer?

How To Be a Visual Basic Programmer?

 

How To Be a Visual Basic Programmer?

 

Becoming a Visual Basic programmer involves learning the Visual Basic programming language, practicing your coding skills, and building projects to gain experience. Here's a step-by-step guide to help you become a Visual Basic programmer:

 

1. **Learn the Basics of Programming**:

   Start by understanding fundamental programming concepts, including variables, data types, control structures (loops and conditionals), functions, and basic input/output (I/O) operations.

 

2. **Get the Required Tools**:

   You'll need an Integrated Development Environment (IDE) to write and run Visual Basic code. Microsoft's Visual Studio is the most popular choice for Visual Basic programming. You can download the free Visual Studio Community edition.

 

3. **Learn Visual Basic Syntax**:

   Begin with the basics of Visual Basic syntax, including variable declarations, data types (Integer, String, Boolean, etc.), operators, and basic input/output. Familiarize yourself with the Visual Basic Integrated Development Environment (IDE).

 

4. **Understand Visual Basic Forms**:

   Visual Basic is often used for creating Windows desktop applications with graphical user interfaces (GUIs). Learn how to design and work with forms, controls (buttons, textboxes, labels, etc.), and event handling.

 

5. **Object-Oriented Programming (OOP)**:

   Gain an understanding of object-oriented programming principles, as Visual Basic supports OOP. Learn about classes, objects, inheritance, and encapsulation.

 

6. **Database Integration**:

   Visual Basic is often used for database applications. Learn how to connect to databases using ADO.NET or Entity Framework, and how to perform CRUD (Create, Read, Update, Delete) operations.

 

7. **Practice Writing Code**:

   Start with small projects and coding exercises to apply what you've learned. Visual Basic tutorials and online coding platforms can provide exercises and challenges to practice your skills.

 

8. **Read Books and Documentation**:

   Invest in Visual Basic programming books and read the official Visual Basic documentation provided by Microsoft. Books like "Visual Basic .NET Programming" can be helpful.

 

9. **Join Communities**:

   Join online programming communities and forums related to Visual Basic. Websites like Stack Overflow and VBForums are great places to ask questions and learn from experienced programmers.

 

10. **Build Projects**:

    As you gain confidence, work on larger personal projects. Create applications that interest you, such as a calculator, address book, or to-do list manager. Building real-world projects is one of the best ways to learn.

 

11. **Debugging and Troubleshooting**:

    Learn debugging techniques to identify and fix errors in your code. Familiarize yourself with Visual Studio's debugging tools.

 

12. **Stay Updated**:

    Visual Basic and the .NET framework are continually evolving. Stay updated with the latest technologies and features. Microsoft regularly releases updates and new versions.

 

13. **Consider Formal Education**:

    If you're serious about a career in Visual Basic programming, consider formal education, such as computer science degrees or programming courses. They can provide structured learning and networking opportunities.

 

14. **Networking and Job Search**:

    Attend local programming meetups, conferences, and networking events to meet professionals in the field. When you're ready, start applying for Visual Basic programming jobs or freelance opportunities.

 

Becoming a proficient Visual Basic programmer takes time and practice. Don't be discouraged by challenges along the way. Keep coding, learning, and seeking help when needed. With dedication and perseverance, you can become a skilled Visual Basic programmer.

Sunday, September 24, 2023

Microsoft Windows 10 System Requirements

Merge Sort in C++

Merge Sort in C++

 A simple program to demonstrate merge sort algorithm in C++ programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada




09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.




Program Listing

merge.cpp

#include <iostream>

#include <vector>


// Merge two sorted arrays into one sorted array

void merge(std::vector<int>& arr, int left, int mid, int right) {

    int n1 = mid - left + 1;

    int n2 = right - mid;


    std::vector<int> L(n1);

    std::vector<int> R(n2);


    // Copy data to temporary arrays L and R

    for (int i = 0; i < n1; ++i)

        L[i] = arr[left + i];

    for (int j = 0; j < n2; ++j)

        R[j] = arr[mid + 1 + j];


    int i = 0, j = 0, k = left;


    // Merge the temporary arrays back into arr

    while (i < n1 && j < n2) {

        if (L[i] <= R[j]) {

            arr[k] = L[i];

            ++i;

        } else {

            arr[k] = R[j];

            ++j;

        }

        ++k;

    }


    // Copy the remaining elements of L and R (if any)

    while (i < n1) {

        arr[k] = L[i];

        ++i;

        ++k;

    }


    while (j < n2) {

        arr[k] = R[j];

        ++j;

        ++k;

    }

}


// Merge Sort function

void mergeSort(std::vector<int>& arr, int left, int right) {

    if (left < right) {

        int mid = left + (right - left) / 2;


        // Sort the first and second halves

        mergeSort(arr, left, mid);

        mergeSort(arr, mid + 1, right);


        // Merge the sorted halves

        merge(arr, left, mid, right);

    }

}


int main() {

    std::vector <int> arr = {12, 11, 13,-67,23,-452, 5, 6, 7};



    std::cout << "\n\t\tMerge Sort in C++\n\n";

    std::cout << "\n\tOriginal array: ";

    for (int num : arr)

        std::cout << num << " ";


    mergeSort(arr, 0, arr.size() - 1);


    std::cout << "\n\n\tSorted array: ";

    for (int num : arr)

        std::cout << num << " ";

    std::cout <<"\n\n";

    return 0;

}


Saturday, September 23, 2023

History of Kotlin Programming Language

History of Kotlin Programming Language

 

History of Kotlin Programming Language

 

Kotlin is a statically-typed programming language that was first developed by JetBrains, a software development company known for creating popular development tools like IntelliJ IDEA. Kotlin was officially announced to the public in July 2011 and has since gained significant popularity, particularly in the world of Android app development. Here's a brief history of Kotlin:

 

1. **Origin and Development**:

   - Kotlin was created as a response to the limitations and shortcomings of existing programming languages used in the Java Virtual Machine (JVM) ecosystem, particularly Java itself.

   - The project started in 2010 when JetBrains initiated the development of Kotlin with the goal of making it more expressive, concise, and safe, while still being fully interoperable with Java.

 

2. **Public Announcement** (July 2011):

   - Kotlin was publicly announced by JetBrains at the JVM Language Summit.

 

3. **Open Source** (February 2012):

   - In February 2012, JetBrains made Kotlin open source by releasing it under the Apache License 2.0. This move allowed the broader developer community to contribute to its development.

 

4. **Maturity and Adoption**:

   - Kotlin gained traction among developers due to its modern features, such as null safety, extension functions, smart casts, and more, which made it easier to write safer and more concise code.

   - It started gaining adoption in various industries and projects, including Android app development.

 

5. **Official Android Support** (May 2017):

   - One of the significant milestones for Kotlin was when Google announced official support for Kotlin in Android app development at the Google I/O conference in May 2017. This endorsement by Google led to a rapid increase in Kotlin's popularity in the Android development community.

 

6. **Kotlin 1.0 Release** (February 2016):

   - Kotlin reached a major milestone with the release of version 1.0, signifying its stability and readiness for production use.

 

7. **Kotlin 1.1** (March 2017):

   - Kotlin 1.1 introduced several new features, including type aliases, destructuring declarations, and more, further enhancing the language's capabilities.

 

8. **Kotlin 1.3** (October 2018):

   - Kotlin 1.3 introduced features like coroutines, which simplified asynchronous programming in Kotlin.

 

9. **Ongoing Development**:

   - Kotlin continues to be actively developed and improved by JetBrains and the open-source community. New features, enhancements, and improvements are regularly added to the language.

 

10. **Kotlin/Native and Kotlin/JS**:

    - Kotlin's versatility extends beyond the JVM. Kotlin/Native and Kotlin/JS enable developers to write Kotlin code for native platforms and web development.

 

Kotlin has become a popular choice for both Android app development and server-side development, and its growth shows no sign of slowing down. Its concise syntax, strong typing, and interoperability with Java make it an attractive option for a wide range of software development projects.

How To Take Care of our Heart?