Thursday, December 7, 2023

Employees Information Using Encapsulation in C++

Employees Information Using Encapsulation in C++

 A program to demonstrate how to declare and use encapsulation 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> #include <string> #include <iomanip> class Employee { private: std::string name; int id; double salary; public: // Constructor to initialize employee attributes Employee(const std::string& empName, int empID, double empSalary) { name = empName; id = empID; salary = empSalary; } // Method to display employee information void displayInfo() { std::cout << "\n\tEmployees Information Using Encapsulation in C++\n\n"; std::cout << "\tEmployee Name: " << name << std::endl; std::cout << "\tEmployee ID: " << id << std::endl; std::cout << "\tEmployee Salary: PHP " << std::fixed <<std::setprecision(2) << salary << std::endl; } // Method to give a raise to the employee's salary void giveRaise(double raiseAmount) { salary += raiseAmount; std::cout << "\tSalary raised by PHP " <<std::fixed <<std::setprecision(2) << raiseAmount << std::endl; } }; int main() { // Create an Employee object Employee emp("Leslie Pepito", 2002, 60412.34); // Display employee information emp.displayInfo(); // Give a raise of $7135.45 to the employee emp.giveRaise(7135.45); // Display updated employee information emp.displayInfo(); return 0; }

Saturday, December 2, 2023

What is Machine Learning?

What is Machine Learning?

 

What is Machine Learning?

 

Machine learning is a subfield of artificial intelligence (AI) that focuses on the development of algorithms and models that enable computers to learn from data and make predictions or decisions without explicit programming. The primary goal of machine learning is to allow computers to automatically learn and improve their performance on a specific task as they are exposed to more data.

 

There are three main types of machine learning:

 

1. **Supervised Learning:** In supervised learning, the algorithm is trained on a labeled dataset, where the input data is paired with corresponding output labels. The goal is for the algorithm to learn a mapping from inputs to outputs, so it can make predictions or classifications on new, unseen data.

 

2. **Unsupervised Learning:** Unsupervised learning involves training the algorithm on an unlabeled dataset, and the system tries to find patterns, relationships, or structures within the data. Clustering and dimensionality reduction are common tasks in unsupervised learning.

 

3. **Reinforcement Learning:** Reinforcement learning involves training a model to make sequences of decisions by interacting with an environment. The model receives feedback in the form of rewards or penalties based on the actions it takes, and the goal is to learn a strategy that maximizes cumulative rewards over time.

 

Machine learning algorithms can be applied to a wide range of tasks, including image and speech recognition, natural language processing, recommendation systems, autonomous vehicles, and more. The success of machine learning relies on the quality and quantity of the data used for training, the choice of algorithms, and careful tuning of parameters.

Friday, December 1, 2023

History of Fortran

History of Fortran

 

History of Fortran

 

Fortran, short for "Formula Translation," is one of the oldest high-level programming languages, designed for numerical and scientific computing. Here's a brief history of Fortran:

 

1. **Development (1950s):**

   - Fortran was first developed by IBM (International Business Machines Corporation) in the 1950s.

   - The initial version, Fortran I, was introduced in 1957 for the IBM 704 computer.

 

2. **Fortran II (1958):**

   - IBM released Fortran II in 1958, which included several improvements over the original version.

 

3. **Fortran IV (1962):**

   - Fortran IV, released in 1962, became widely popular and standard in the industry.

   - This version introduced many new features, including character data types and subprograms (subroutines and functions).

 

4. **Fortran 66 (1966):**

   - Fortran underwent a significant revision in 1966, resulting in Fortran 66.

   - This version standardized the language, and many new features were added, including the DO loop and the IF-THEN-ELSE statement.

 

5. **Fortran 77 (1977):**

   - Fortran 77, released in 1977, brought further improvements and standardization.

   - It introduced features like structured programming constructs, block IF statements, and complex data types.

 

6. **Fortran 90 (1991):**

   - Fortran 90 marked a major overhaul of the language, introducing many modern features.

   - This version added dynamic memory allocation, modules, recursion, and array operations.

 

7. **Fortran 95 (1997):**

   - Fortran 95 was a minor revision, mainly clarifying and correcting some issues in Fortran 90.

 

8. **Fortran 2003 (2004):**

   - Fortran 2003 introduced features like object-oriented programming (OOP) constructs, improved interoperability with C, and support for parallel programming.

 

9. **Fortran 2008 (2010):**

   - Fortran 2008 brought further enhancements, including coarrays for parallel programming, enhancements to the language's array features, and additional intrinsic procedures.

 

10. **Recent Developments:**

    - Fortran continues to be used in scientific and high-performance computing due to its efficiency in handling numerical calculations.

    - While Fortran is no longer as dominant in general-purpose programming, it remains a crucial language in specific domains.

 

Fortran's long history and ongoing development reflect its resilience and adaptability in the scientific and engineering communities. Despite the emergence of newer languages, Fortran continues to play a vital role in high-performance computing and scientific applications.

Thursday, November 30, 2023

Teachers and Students Using the Hybrid Learning Model Based on Machine L...

What is a Diode?

 

What is a Diode?

 

A diode is a semiconductor device that allows current to flow in one direction only. It has two terminals, known as the anode and the cathode. The basic function of a diode is to control the direction of electric current flow. When a voltage is applied across the diode in the forward direction (anode positive, cathode negative), it allows current to flow through it. In the reverse direction, it blocks the current.

 

There are different types of diodes, each designed for specific applications. Some common types include:

 

1. **Rectifier Diodes:** Used to convert alternating current (AC) to direct current (DC) in power supply applications.

 

2. **Light-Emitting Diodes (LEDs):** Emit light when current flows through them. LEDs are commonly used for indicators, displays, and lighting.

 

3. **Zener Diodes:** Designed to operate in the reverse breakdown voltage region, maintaining a nearly constant voltage across their terminals. They are often used as voltage regulators.

 

4. **Schottky Diodes:** Known for their fast switching speed and low forward voltage drop. They are commonly used in high-frequency applications and as rectifiers in power supplies.

 

5. **Photodiodes:** These diodes are designed to generate a current in response to light. They find applications in light detectors and optical communication systems.

 

Diodes play a crucial role in electronics, serving various functions such as rectification, signal demodulation, voltage regulation, and protection against reverse voltage.

What is a Diode?

What is Distance Learning?

Wednesday, November 29, 2023

Available na po ang book ko na introduction to Java Programming 3rd edition

Why we need books?

 

Why we need books?

 

Books serve a variety of essential functions in our lives, and their importance can be seen from both practical and emotional perspectives. Here are several reasons why books are considered valuable:

 

1. **Knowledge and Education:** Books are a fundamental source of information and knowledge. They cover a wide range of subjects, allowing individuals to learn about history, science, philosophy, literature, and many other topics. Books are crucial for formal education, providing students with the necessary material for their studies.

 

2. **Cultural Preservation:** Books play a vital role in preserving and passing on culture from one generation to the next. They contain the collective wisdom, stories, and experiences of humanity. Literature, in particular, reflects the values, beliefs, and ideas of different societies throughout history.

 

3. **Entertainment:** Books offer a form of entertainment, allowing readers to escape into different worlds, experience diverse perspectives, and engage their imaginations. Fictional stories, in particular, provide a means of relaxation and enjoyment.

 

4. **Critical Thinking:** Reading books encourages critical thinking and analytical skills. Readers engage with the content, consider different viewpoints, and develop the ability to analyze information. This process contributes to intellectual growth and cognitive development.

 

5. **Language Development:** Reading books enhances language skills, vocabulary, and comprehension. Exposure to well-written content helps individuals improve their communication skills and language proficiency.

 

6. **Personal Development:** Books often contain insights into human nature, self-help advice, and personal development strategies. Many people turn to books to find guidance, motivation, and inspiration for improving their lives.

 

7. **Communication:** Books serve as a means of communication between authors and readers. They facilitate the exchange of ideas, emotions, and information across time and space. Books allow individuals to connect with the thoughts and experiences of people from different backgrounds and cultures.

 

8. **Research and Reference:** Books are valuable resources for researchers and academics. They provide in-depth information, references, and citations for those seeking to explore specific topics in detail.

 

9. **History and Documentation:** Books are a primary medium for documenting historical events, scientific discoveries, and cultural achievements. They contribute to the preservation of knowledge and serve as a record of human endeavors.

 

10. **Imagination and Creativity:** Reading books stimulates the imagination and creativity of individuals. Fictional works, in particular, encourage readers to envision different scenarios, fostering creativity and a broader perspective.

 

In summary, books are essential for learning, cultural preservation, entertainment, personal development, and much more. They play a crucial role in shaping individuals and societies, fostering intellectual growth, and connecting people across time and space.

Why we need books?