Learn Computer Programming Free from our source codes in my website.
Sponsored Link Please Support
https://www.techseries.dev/a/27966/qWm8FwLb
https://www.techseries.dev/a/19181/qWm8FwLb
My Personal Website is http://www.jakerpomperada.com
Email me at jakerpomperada@gmail.com and jakerpomperada@yahoo.com
Sunday, June 23, 2024
Vehicle Using Inheritance in Python
class Vehicle:
print("\tVehicle is moving.")
class Car(Vehicle):
def move(self):
print("\tCar is driving.")
if __name__ == "__main__":
vehicle = Vehicle()
car = Car()
print("\n\n\tVehicle Using Inheritance in Python\n")
vehicle.move() # Calls the base class method
car.move() # Calls the overridden method in the derived class
print("\n\tEnd of Program. Thank you for using this program.")
Saturday, June 22, 2024
Friday, June 21, 2024
Wednesday, June 19, 2024
What is Time?
What is Time?
What is time, exactly? Physicists define time as the progression of events from the past to the present into the future. Basically, if a system is unchanging, it is timeless. Time can be considered to be the fourth dimension of reality, used to describe events in three-dimensional space. It is not something we can see, touch, or taste, but we can measure its passage.
Tuesday, June 18, 2024
Monday, June 17, 2024
Sunday, June 16, 2024
Thursday, June 13, 2024
Wednesday, June 12, 2024
Tuesday, June 11, 2024
Monday, June 10, 2024
What is a Project Manager?
What is a Project Manager?
A project manager is a professional who organizes, plans, and executes projects while working within restraints like budgets and schedules.
Count Vowels in a String Using a Class in C#
// VowelCounter.cs
// Author : Dr. Jake Rodriguez Pomperada, MAED-IT, MIT, PHD-TM
// Date : June 9, 2024 Sunday 10:49 PM
// Tools : Microsoft Visual Studio 2022 Community Edition (64 Bit)
// Website : http://www.jakerpomperada.com
// YouTube Channel : https://www.youtube.com/jakepomperada
// Email : jakerpomperada@gmail.com
using System;
using System.Linq;
// Define the VowelCounter class in C#
public class VowelCounter
{
public string inputString;
public int vowelCount;
public VowelCounter()
{
inputString = "";
vowelCount = 0;
}
public void GetInputString()
{
Console.WriteLine("\n\tCount Vowels in a String Using a Class in C#\n");
Console.Write("\n\tEnter a string: ");
inputString = Console.ReadLine().Trim();
}
public void ConvertToLowerCase()
{
inputString = inputString.ToLower();
}
public void CountVowels()
{
foreach (char c in inputString)
{
if ("aeiou".Contains(c))
{
vowelCount++;
}
}
}
public void DisplayResult()
{
Console.WriteLine("\n\tString in lowercase : " + inputString);
Console.WriteLine("\n\n\tNumber of vowels : " + vowelCount);
Console.WriteLine("\n\n\tEnd of Program\n");
Console.ReadKey();
}
}
// Main program in C#
class Program
{
static void Main(string[] args)
{
VowelCounter counter = new VowelCounter();
counter.GetInputString();
counter.ConvertToLowerCase();
counter.CountVowels();
counter.DisplayResult();
}
}