Home Blog Page 8

Mengais Berkah Tempat Kelahiran Baginda Nabi

0

وكان مولِدُه صلى الله عليه وسلم بالشِّعبِ وهو مكانٌ معروفٌ متواترٌ عند أهلِ مكةَ. يخرُج إليه أهلُ مكةَ كلَّ عامٍ يومَ المولِدِ ويحتَفِلون بذلك أعظمَ من احْتِفالِهم بيومِ العيدِ، وذلك إلى يومِنا هذا.
وقد زُرتُه وتبرَّكْتُ به عامَ حِجَّتِي سنةَ اثنتين وتسعين وسبعِمئةٍ ورأيتُ مِن بَركتِه عظيمًا. ثم كرَّرتُ زيارتَه في مُجاوَرَتِي سنةَ ثلاثٍ وعشرين وثمانِمىٔةٍ، وكان قد تُهدِّمَ فرمَّمتُه وقُرىٔ عليَّ كتابِي التعريف بالمولِد الشريفِ عليَّ وسمعه خَلقٌ لا يُحْصَون وكان يومًا مشهودًا.

Tempat kelahiran Nabi shallallahu ‘alaihi wasallam terletak di al-Syi’b (Syi’b Abi Thalib atau Syi’b Bani Hasyim atau sekarang dikenal dengan nama Syi’b Ali), sebuah tempat yang terkenal dan mutawatir bagi penduduk Mekah. Penduduk Mekah menuju ke tempat tersebut setiap tahun pada waktu kelahiran Nabi shallallahu ‘alaihi wasallam dan mengadakan perayaan Maulid yang lebih meriah dari pada perayaan hari raya. Dan kondisi itu berlangsung sampai saat ini (waktu dimana penulis mengarang kitab ini).

Aku telah mengunjungi tempat kelahiran Nabi shallallahu ‘alaihi wasallam dan mengais keberkahan dengannya pada saat aku melaksanakan ibadah haji tahun 792 H. Dan aku menyaksikan agungnya keberkahan tersebut. Aku mengunjunginya lagi pada saat kedekatanku dengan Mekah pada tahun 823 H dimana tempat kelahiran Nabi shallallahu ‘alaihi wasallam telah dibongkar, maka aku merenovasinya, dan dibacakan kepadaku kitab karyaku yang berjudul al-Ta’rif bi al-Maulid al-Syarif yang didengar oleh khalayak yang tak terhitung banyaknya. Dan hari itu menjadi hari yang masyhur.
Wallahu a’lam bisshawab.

Sumber: ‘Arf al-Ta’rif bi al-Maulid al-Syarif karya al-Imam al-Hafidh al-Muqri Abu al-Khair Muhammad bin Muhammad Ibn al-Jazari, w. 833 H, Dar al-Hadits al-Kattaniyyah, hal. 23.

Oleh : KH. Bagus Ahmadi (Pondok Pesantren MIA Putra, Pacet – Moyoketen – Boyolangu Tulungagung)

Penggagas Pertama Perayaan Maulid Nabi Shallallahu ‘Alaihi Wasallam

0

وأولُ من أحدثَ ذلك الملكُ المظفَّرُ صاحبُ إربلَ، وكان يحتفل فيه احتفالاً هاىٔلا. قال سبطُ ابنِ الجوزي في مرآة الزمان: حكى لي بعضُ من حضر سماطَ المظفَّر في بعض الموالد أنه عد فيه خمسةَ آلاف رأس غنمٍ شوي، وعشرةَ آلاف دجاجة، وماىٔةَ فرس، وماىٔةَ ألف صحن حلوي. وكان يحضر عنده في المولد أعيانُ العلماء والصوفية، فيخلع عليهم ويطلق لهم العطيةَ، وكان يصرف على المولد ثلاثَماىٔة ألف دينارٍ
واستدل شيخُ الإسلام والحافظُ أبو الفضل ابنُ حجرٍ العسقلاني لكونه بدعةً حسنةً بخبر الصحيحين، أنه صلى الله عليه وسلم لما قدم المدينةَ وجد اليهودَ يصومون يومَ عاشوراءَ فسألهم فقالوا: هذا يومٌ أغرق اللهُ فيه فرعونَ ونجَّى موسى فنحن نصومه شكرًا لله تعالى، فقال صلى الله عليه وسلم: أنا أحقُّ بموسى منكم، فصامه وأمرَ بصيامه
قال -أعني شيخُ الإسلام: فيُستفاد منه فضلُ الشكر لله تعالى بأنواعِ العبادات على ما منَّ به في يوم معين من إسداءِ نعمة أو دفع نقمة ويُعاد ذلك في نظير ذلك اليوم من كل سنة. وأيُّ نعمةٍ أعظم من بُروزِ هذا النبيِّ صلى الله عليه وسلم نبيِّ الرحمة في ذلك اليومِ

Orang pertama yang mengadakan perayaan Maulid Nabi shallallahu ‘alaihi wasallam adalah raja al-Mudhaffar (Mudhaffar al-Din Abu Sa’id Kukburi bin Zain al-Din Ali (549-630 H), penguasa Arbil Irak. Ia mengadakan perayaan Maulid Nabi shallallahu ‘alaihi wasallam dengan perayaan yang mencengangkan. Cucu Ibn al-Jauzi (Syaikh Syams al-Din Abu al-Mudhaffar Yusuf bin Qazughli bin Abdullah (581-654 H) dalam kitab Mir-ah al-Zaman fi Tawarikh al-A’yan berkata : “Sebagian orang yang hadir dalam jamuan makannya raja al-Mudhaffar dalam sebagian perayaan Maulid Nabi shallallahu ‘alaihi wasallam menceritakan kepadaku bahwa jumlah hidangannya adalah lima ribu kepala kambing bakar, sepuluh ribu ekor ayam, seratus ekor kuda, dan seratus piring manisan. Beliau menghadirkan para pemuka ulama dan tokoh sufi. Beliau menyerahkan berbagai pemberian kepada mereka dan mensedekahkan sebesar tiga ratus ribu dinar dalam acara Maulid tersebut.

Syaikh al-Islam al-Hafidh Abu al-Fadl Ibn Hajar al-‘Asqalani (773-852 H) mengetengahkan dalil tentang keberadaan Maulid Nabi shallallahu ‘alaihi yang dihukumi sebagai bid’ah hasanah dengan dasar hadits shahihain (riwayat al-Bukhari dan Muslim), bahwa Rasulullah shallallahu ‘alaihi wasallam ketika tiba di Madinah menjumpai orang-orang Yahudi menjalankan puasa hari ‘Asyura, Beliau bertanya kepada mereka, dan mereka menjawab: “Hari ini adalah hari dimana Allah ta’ala menenggelamkan Fir’aun dan menyelamatkannabi Musa, kami berpuasa sebagai ungkapan rasa syukur kepada Allah ta’ala.” Nabi shalallahu alaihi wasallam lantas berkata: “Aku lebih mempunyai terhadap nabi Musa daripada kalian.” Lalu Nabi shallallahu ‘alaihi wasallam berpuasa ‘Asyura dan menyuruh para sahabat untuk berpuasa.

Syaikh al-Islam Ibn Hajar al-‘Asqalani berkata: “Dari hadits diatas dapat diambil faedah tentang keutamaan bersyukur kepada Allah ta’ala dengan melaksanakan berbagai macam ibadah atas anugerah yang telah dilimpahkan-Nya pada hari tertentu, baik berupa pemberian kenikmatan maupun terhindar dari bencana, dan bisa diulang pada hari yang sama setiap tahunnya. Namun mana yang lebih agung daripada kelahiran Sang Nabi ini shallallahu ‘alaihi wasallam, yakni Nabi pembawa rahmat, pada hari itu.
Wallahu a’lam bisshawab.

Sumber: Syarh al-Maulid al-Nabawi, Al-Kaukab al-Anwar ‘ala ‘Iqd al-Jauhar fi Maulid al-Nabi al-Azhar karya Mufti madzhab Syafi’i di Madinah al-‘Allamah Sayyid Ja’far bin Isma’il bin Zain al-‘Abidin bin Muhammad al-Hadi bin Zain bin Ja’far bin Hasan al-Barzanji (1250-1317 H), cicit dari pengarang kitab Maulid al-Barzanji yaitu al-‘Allamah Sayyid Ja’far bin Hasan bin Abdul Karim al-Barzanji (1128-1177 H), Markaz Ibn ‘Aththar li al-Turats, hal. 17-18.

Oleh : KH. Bagus Ahmadi (Pondok Pesantren MIA Putra – Pacet, Moyoketen, Boyolangu, Tulungagung)

How to Travel in Style: Finding a Perfect Flight

0

What’s possible in a week? If you dedicated seven days to the achievement of one goal, how ambitious could you make this goal? These were the questions that the multilingual friends Katy and Sara posed themselves when they determined to learn English in one week, to prove that it can be done and anyone can do it with the right methods.

They would attempt to liberate themselves from the distractions and responsibilities of modern-day life in order to cram eight hours of study time and I was observing some of the world’s most capable language learners at work.

The language learning expert: Sara

The friends set themselves the challenge of learning a language in a week in order to stretch themselves, and then it was a question of choosing which language to learn. English presented itself as a natural option; there are nigh on 300,000 English speakers in Germany’s capital, and the areas are dotted with stores adorned with signs in English.

“Truly understanding one’s environment requires one to first understand English”

The first operational step in the friends learning process was to decorate the entire apartment with sticky notes. This had an almost ceremonial touch to it as the friends delved into dictionaries and proceeded to label everything with its corresponding English name.

Within the space of about an hour it was impossible to carry out any menial task, be it making a coffee or flicking off a light switch, without first being presented with at least three different words related to this action.

Sara learning in the park

The importance of the other twin’s presence became immediately apparent as Katy and Sara delegated responsibilities for rooms to decorate with sticky notes. This simple task was augmented by continuous little tests that they would spring on one another, and the fact that they split up their day slightly differently and studied different topics meant that each twin became a source of knowledge for the other.

The most extraordinary moment came towards the end of the week!

The friends simply switched their everyday conversations to English, asking one another if they wanted tea or coffee, were ready to cook dinner or when they were going to leave the house.

Katy and Sara had numerous micro-challenges throughout the week. On the first day they were visited by a English friend who greeted them in English and complimented them on how quickly they’d picked up their first words and phrases.

They then learned the names of fruits and the numbers from one to a billion so that they could visit the English market (although they refrained from purchasing nine hundred thousand kumquats). Displaying their haul after their first functional exchange in English, they beamed with pride and a palpable sense of accomplishment before marching back home to study further.

Katy playing audio lessons

On our second visit to the brother’s apartment 24 hours into the week, we found them sampling dozens of different kinds of English snacks.

Like kids staring at the backs of cereal packs before heading to school, the nutritional information and various special offers and competitions on the packaging were analysed during snack breaks.

There was no moment of complete removal from the language learning process during the eight hours that the friends had allotted to it.

They were constantly using their existing knowledge to support the ever-growing knowledge of English, this being the root of their success.

“you will likely come across words that share common origins with your native tongue”

The friends spent a lot of time engrossed in books or on their computers and apps, flicking and swiping their way through exercises eagerly, but at other times they were to be found searching busily for English radio stations and write-ups of English football games on the web.

There is no definitive method to learn a language fluently

All too often, people enter their weekly language class to converse with their teacher, but then barely have any contact with other speakers and that’s not enough.

The old saying that we can solve problems more effectively when we sleep on it may be especially true if the problem we’re trying to solve is learning a new language.

Motivated Katy out to the library

Researchers from two Swiss universities wanted to know if they could enhance the learning of words from a foreign language by exposing people to the words during non-rapid eye movement sleep the deep, dreamless sleep period that most of us experience during the first few hours of the night.

To find out, they gathered two groups of study participants, all of whom were native German speakers, and gave them a series of Dutch-to-German word pairs to learn at 10 pm. One group was then instructed to get some sleep, while the other group was kept awake.For the next few hours both groups listened to an audio playback of the word pairs they’d already been exposed to and some they hadn’t yet heard.

The researchers then re-gathered both groups at 2 am and gave them a test of the Dutch words to uncover any differences in learning. And indeed there was a difference:

“The group that listened to the words during sleep did better at recalling the words they’d heard”

The simple yet potent trick the researchers employed is known as verbal cueing, and this isn’t the first claim made for its success while sleeping. But what makes this study different is that it puts a finer point on the conditions necessary for this trick to actually work namely, it only works when we’ve already been exposed to the verbal cues before we sleep.

The researchers added a techie dimension by conducting electroencephalographic (EEG)recordings of the sleeping participants brains to track neural electrical activity during the learning period.

They found that learning the foreign words overlapped with the appearance of theta brain waves, an intriguing result since theta is the brain wave state often associated with heightened learning while awake (usually we’re in either the high-frequency, high-alertness alpha or beta states while awake, but it’s thought possible to induce theta state slower in frequency than alpha and beta through concentration techniques).

Get Lost in Italy and Get Ready for Adventure!

0

What’s possible in a week? If you dedicated seven days to the achievement of one goal, how ambitious could you make this goal? These were the questions that the multilingual friends Katy and Sara posed themselves when they determined to learn English in one week, to prove that it can be done and anyone can do it with the right methods.

They would attempt to liberate themselves from the distractions and responsibilities of modern-day life in order to cram eight hours of study time and I was observing some of the world’s most capable language learners at work.

The language learning expert: Sara

The friends set themselves the challenge of learning a language in a week in order to stretch themselves, and then it was a question of choosing which language to learn. English presented itself as a natural option; there are nigh on 300,000 English speakers in Germany’s capital, and the areas are dotted with stores adorned with signs in English.

“Truly understanding one’s environment requires one to first understand English”

The first operational step in the friends learning process was to decorate the entire apartment with sticky notes. This had an almost ceremonial touch to it as the friends delved into dictionaries and proceeded to label everything with its corresponding English name.

Within the space of about an hour it was impossible to carry out any menial task, be it making a coffee or flicking off a light switch, without first being presented with at least three different words related to this action.

Sara learning in the park

The importance of the other twin’s presence became immediately apparent as Katy and Sara delegated responsibilities for rooms to decorate with sticky notes. This simple task was augmented by continuous little tests that they would spring on one another, and the fact that they split up their day slightly differently and studied different topics meant that each twin became a source of knowledge for the other.

The most extraordinary moment came towards the end of the week!

The friends simply switched their everyday conversations to English, asking one another if they wanted tea or coffee, were ready to cook dinner or when they were going to leave the house.

Katy and Sara had numerous micro-challenges throughout the week. On the first day they were visited by a English friend who greeted them in English and complimented them on how quickly they’d picked up their first words and phrases.

They then learned the names of fruits and the numbers from one to a billion so that they could visit the English market (although they refrained from purchasing nine hundred thousand kumquats). Displaying their haul after their first functional exchange in English, they beamed with pride and a palpable sense of accomplishment before marching back home to study further.

Katy playing audio lessons

On our second visit to the brother’s apartment 24 hours into the week, we found them sampling dozens of different kinds of English snacks.

Like kids staring at the backs of cereal packs before heading to school, the nutritional information and various special offers and competitions on the packaging were analysed during snack breaks.

There was no moment of complete removal from the language learning process during the eight hours that the friends had allotted to it.

They were constantly using their existing knowledge to support the ever-growing knowledge of English, this being the root of their success.

“you will likely come across words that share common origins with your native tongue”

The friends spent a lot of time engrossed in books or on their computers and apps, flicking and swiping their way through exercises eagerly, but at other times they were to be found searching busily for English radio stations and write-ups of English football games on the web.

There is no definitive method to learn a language fluently

All too often, people enter their weekly language class to converse with their teacher, but then barely have any contact with other speakers and that’s not enough.

The old saying that we can solve problems more effectively when we sleep on it may be especially true if the problem we’re trying to solve is learning a new language.

Motivated Katy out to the library

Researchers from two Swiss universities wanted to know if they could enhance the learning of words from a foreign language by exposing people to the words during non-rapid eye movement sleep the deep, dreamless sleep period that most of us experience during the first few hours of the night.

To find out, they gathered two groups of study participants, all of whom were native German speakers, and gave them a series of Dutch-to-German word pairs to learn at 10 pm. One group was then instructed to get some sleep, while the other group was kept awake.For the next few hours both groups listened to an audio playback of the word pairs they’d already been exposed to and some they hadn’t yet heard.

The researchers then re-gathered both groups at 2 am and gave them a test of the Dutch words to uncover any differences in learning. And indeed there was a difference:

“The group that listened to the words during sleep did better at recalling the words they’d heard”

The simple yet potent trick the researchers employed is known as verbal cueing, and this isn’t the first claim made for its success while sleeping. But what makes this study different is that it puts a finer point on the conditions necessary for this trick to actually work namely, it only works when we’ve already been exposed to the verbal cues before we sleep.

The researchers added a techie dimension by conducting electroencephalographic (EEG)recordings of the sleeping participants brains to track neural electrical activity during the learning period.

They found that learning the foreign words overlapped with the appearance of theta brain waves, an intriguing result since theta is the brain wave state often associated with heightened learning while awake (usually we’re in either the high-frequency, high-alertness alpha or beta states while awake, but it’s thought possible to induce theta state slower in frequency than alpha and beta through concentration techniques).

Constructors (Konstruktor) dalam C#

0

Apa itu Constructor?

Constructor adalah sebuah method khusus di dalam sebuah kelas yang otomatis dijalankan saat objek dibuat.
Fungsi utamanya adalah menginisialisasi data / nilai awal pada objek.

Ciri-ciri constructor di C#:

  • Nama constructor sama dengan nama kelas
  • Tidak punya return type (bukan void, bukan juga tipe apapun)
  • Dipanggil otomatis ketika objek dibuat dengan new

Kenapa Constructor Penting?

Bayangkan kamu membuat objek Mobil.
Saat mobil dibuat, kita ingin misalnya warna, tahun, atau merk langsung terpasang — itu tugas constructor.

Jenis-Jenis Constructor

1) Default Constructor

Constructor yang tidak punya parameter.
Jika kamu tidak buat constructor, kompiler C# akan otomatis membuatkan default constructor.

Contoh:

using System;

class Car

{
    public string color;
    public int year;

    // Default constructor
    public Car()
    {
        color = "White";   // memberi nilai awal
        year = 2000;
        Console.WriteLine("Car dibuat!");
    }

    public static void Main()
    {
        Car myCar = new Car();
        Console.WriteLine(myCar.color + " - " + myCar.year);
    }
}

Output:

Car dibuat!

White – 2000

2) Parameterized Constructor

Constructor yang menerima parameter untuk memberi nilai spesifik pada objek.

Contoh:

using System;

class Person
{
    public string name;
    public int age;

    // Constructor dengan parameter
    public Person(string name, int age)
    {
        this.name = name;
        this.age = age;
    }

    public static void Main()
    {
        Person p = new Person("Ani", 21);
        Console.WriteLine(p.name + " berumur " + p.age);
    }
}

Output:

Ani berumur 21

3) Copy Constructor

Digunakan menggandakan objek dengan nilai yang sama dari objek lain.
C# tidak punya copy constructor otomatis — kita buat sendiri.

Contoh:

using System;

class Book
{
    public string title;
    public int pages;

    public Book(string t, int p)
    {
        title = t;
        pages = p;
    }

    // Copy Constructor
    public Book(Book b)
    {
        title = b.title;
        pages = b.pages;
    }

    public static void Main()
    {
        Book b1 = new Book("Intro C#", 150);
        Book b2 = new Book(b1);  // kopi dari b1
        Console.WriteLine(b2.title + " – " + b2.pages + " halaman");
    }
}

4) Static Constructor

  • Dipanggil sekali saja ketika kelas pertama kali diakses.
  • Berguna untuk menginisialisasi static fields.
  • Tidak punya parameter.

Contoh:

using System;

class Counter
{
    public static int count;

    // Static constructor
    static Counter()
    {
        count = 100;
        Console.WriteLine("Static Constructor dipanggil");
    }

    public static void Main()
    {
        Console.WriteLine("Count = " + Counter.count);
    }
}

5) Private Constructor

Constructor dengan akses private, men-blokir pembuatan objek dari luar kelas → sering digunakan bersama pola Singleton.

Contoh sederhananya:

class Example
{
    private Example()
    {
        Console.WriteLine("Private constructor!");
    }
}

Jika kamu coba new Example(), akan error karena constructor tidak bisa dipanggil dari luar.

Ringkasan Sifat Constructor

Sifat Artinya
Tidak punya return type Tidak seperti method biasa
Sama nama dengan kelas Tidak boleh beda
Bisa di-overload Satu kelas bisa punya lebih dari satu constructor
Static hanya satu Cuma satu static constructor per kelas

Tips Belajar untuk Pemula

  • Selalu pahami perbedaan antara constructor dan method biasa:
    • Constructor otomatis dipanggil saat objek dibuat
    • Method harus dipanggil secara eksplisit
  • Gunakan parameterized constructor jika butuh objek dengan nilai berbeda-beda.
  • Gunakan this untuk mengacu ke field kelas dalam constructor.

Memahami Method dalam C#: Panduan Dasar untuk Pemula OOP

0

Apa Itu Method di C#?

Dalam C#, method adalah blok kode yang melakukan tugas tertentu. Bayangkan method seperti daftar instruksi yang melakukan pekerjaan, misalnya menghitung sesuatu atau menampilkan pesan. Method selalu ditulis di dalam kelas (class) karena C# adalah bahasa berorientasi objek.

Dengan metode, program menjadi:

  • Lebih terstruktur
  • Lebih mudah dipahami
  • Bisa dipakai ulang tanpa menulis kode yang sama berkali-kali

Ini membantu membuat kode yang rapi dan profesional sejak awal belajar.

Struktur Dasar Method

Sebelum masuk contoh, ini bagian-bagian penting dalam method:

<Access_Modifier> <Return_Type> <Method_Name>(<Parameters>)

{
    // Kode yang dijalankan ketika method dipanggil
}
  • Access Modifier: menentukan siapa yang boleh memanggil method (misalnya public, private).
  • Return Type: tipe data yang dikembalikan method (void jika tidak mengembalikan apa-apa).
  • Method Name: nama yang kita buat untuk memanggilnya.
  • Parameters: nilai yang bisa diterima method (opsional).

Studi Kasus Implementatif

Studi Kasus 1 — Program Hitung Luas Lingkaran

Bayangkan kita ingin membuat program yang menghitung luas lingkaran. Daripada menulis rumus langsung di Main, kita buat method sendiri supaya kode lebih bersih.

using System;

class Hitung
{
    // Method untuk menghitung luas lingkaran
    static double HitungLuasLingkaran(double jariJari)
    {
        const double PI = 3.14;
        return PI * jariJari * jariJari;
    }

    static void Main(string[] args)
    {
        Console.Write("Masukkan jari-jari: ");
        double r = Convert.ToDouble(Console.ReadLine());

        double luas = HitungLuasLingkaran(r);
        Console.WriteLine("Luas lingkaran: " + luas);
    }
}

Penjelasan:

  • HitungLuasLingkaran adalah method yang menerima jari-jari sebagai input dan mengembalikan hasil luas.

Studi Kasus 2 — Menampilkan Pesan Sambutan

Kita juga bisa membuat method yang tidak mengembalikan nilai (tipe void). Cocok untuk tugas seperti menampilkan pesan:

using System;

class SelamatDatang
{
    static void TampilkanSalam(string nama)
    {
        Console.WriteLine("Halo, " + nama + "! Selamat belajar C#!");
    }

    static void Main(string[] args)
    {
        TampilkanSalam("Teman Belajar");
    }
}

Penjelasan:

  • Method TampilkanSalam menerima nama dan langsung menampilkan pesan ke layar.

Cara Method Dipanggil

Ada dua jenis pemanggilan method dalam C#:

  1. Static Method

Tidak butuh membuat objek dari kelasnya. Langsung panggil dari nama kelas atau langsung dari Main jika di kelas yang sama. Contoh di atas (HitungLuasLingkaran dan TampilkanSalam) adalah static method.

  1. Instance Method

Butuh membuat objek dari kelasnya dulu. Misalnya:

class Sapa
{
    public void SapaTeman()
    {
        Console.WriteLine("Hai semuanya!");
    }
}


class Program
{
    static void Main(string[] args)
    {
        Sapa obj = new Sapa();
        obj.SapaTeman();
    }
}

Di sini kita membuat objek obj dari kelas Sapa, lalu memanggil SapaTeman melalui objek itu — karena bukan static.

Method dengan Parameter

Method bisa menerima satu atau lebih input nilai melalui parameter. Ini membantu supaya kode lebih fleksibel, misalnya menjumlahkan dua angka:

static int Jumlah(int a, int b)
{
    return a + b;
}

Di contoh ini, method menerima dua angka dan mengembalikan hasil penjumlahannya.

Kenapa Method Penting di OOP?

Di pemrograman berorientasi objek:

  • Method menunjukkan apa yang bisa dilakukan oleh objek kelas itu
  • Kode jadi lebih modular
  • Mudah dibagi ke dalam bagian-bagian yang jelas dan bisa dipakai ulang lagi nantinya

Ini bagian penting dari belajar OOP di C#.

Ringkasan Cepat

Konsep Maknanya
Method Sekumpulan kode yang melakukan satu tugas tertentu
static Dipanggil tanpa objek
void Tidak mengembalikan nilai
Return type selain void Kembali nilai ke pemanggil
Parameter Input yang diterima method sebelum bekerja

He Speaks 11 Languages – 7 Tricks To Learn Any Language

0

What’s possible in a week? If you dedicated seven days to the achievement of one goal, how ambitious could you make this goal? These were the questions that the multilingual friends Katy and Sara posed themselves when they determined to learn English in one week, to prove that it can be done and anyone can do it with the right methods.

They would attempt to liberate themselves from the distractions and responsibilities of modern-day life in order to cram eight hours of study time and I was observing some of the world’s most capable language learners at work.

The language learning expert: Sara

The friends set themselves the challenge of learning a language in a week in order to stretch themselves, and then it was a question of choosing which language to learn. English presented itself as a natural option; there are nigh on 300,000 English speakers in Germany’s capital, and the areas are dotted with stores adorned with signs in English.

“Truly understanding one’s environment requires one to first understand English”

The first operational step in the friends learning process was to decorate the entire apartment with sticky notes. This had an almost ceremonial touch to it as the friends delved into dictionaries and proceeded to label everything with its corresponding English name.

Within the space of about an hour it was impossible to carry out any menial task, be it making a coffee or flicking off a light switch, without first being presented with at least three different words related to this action.

Sara learning in the park

The importance of the other twin’s presence became immediately apparent as Katy and Sara delegated responsibilities for rooms to decorate with sticky notes. This simple task was augmented by continuous little tests that they would spring on one another, and the fact that they split up their day slightly differently and studied different topics meant that each twin became a source of knowledge for the other.

The most extraordinary moment came towards the end of the week!

The friends simply switched their everyday conversations to English, asking one another if they wanted tea or coffee, were ready to cook dinner or when they were going to leave the house.

Katy and Sara had numerous micro-challenges throughout the week. On the first day they were visited by a English friend who greeted them in English and complimented them on how quickly they’d picked up their first words and phrases.

They then learned the names of fruits and the numbers from one to a billion so that they could visit the English market (although they refrained from purchasing nine hundred thousand kumquats). Displaying their haul after their first functional exchange in English, they beamed with pride and a palpable sense of accomplishment before marching back home to study further.

Katy playing audio lessons

On our second visit to the brother’s apartment 24 hours into the week, we found them sampling dozens of different kinds of English snacks.

Like kids staring at the backs of cereal packs before heading to school, the nutritional information and various special offers and competitions on the packaging were analysed during snack breaks.

There was no moment of complete removal from the language learning process during the eight hours that the friends had allotted to it.

They were constantly using their existing knowledge to support the ever-growing knowledge of English, this being the root of their success.

“you will likely come across words that share common origins with your native tongue”

The friends spent a lot of time engrossed in books or on their computers and apps, flicking and swiping their way through exercises eagerly, but at other times they were to be found searching busily for English radio stations and write-ups of English football games on the web.

There is no definitive method to learn a language fluently

All too often, people enter their weekly language class to converse with their teacher, but then barely have any contact with other speakers and that’s not enough.

The old saying that we can solve problems more effectively when we sleep on it may be especially true if the problem we’re trying to solve is learning a new language.

Motivated Katy out to the library

Researchers from two Swiss universities wanted to know if they could enhance the learning of words from a foreign language by exposing people to the words during non-rapid eye movement sleep the deep, dreamless sleep period that most of us experience during the first few hours of the night.

To find out, they gathered two groups of study participants, all of whom were native German speakers, and gave them a series of Dutch-to-German word pairs to learn at 10 pm. One group was then instructed to get some sleep, while the other group was kept awake.For the next few hours both groups listened to an audio playback of the word pairs they’d already been exposed to and some they hadn’t yet heard.

The researchers then re-gathered both groups at 2 am and gave them a test of the Dutch words to uncover any differences in learning. And indeed there was a difference:

“The group that listened to the words during sleep did better at recalling the words they’d heard”

The simple yet potent trick the researchers employed is known as verbal cueing, and this isn’t the first claim made for its success while sleeping. But what makes this study different is that it puts a finer point on the conditions necessary for this trick to actually work namely, it only works when we’ve already been exposed to the verbal cues before we sleep.

The researchers added a techie dimension by conducting electroencephalographic (EEG)recordings of the sleeping participants brains to track neural electrical activity during the learning period.

They found that learning the foreign words overlapped with the appearance of theta brain waves, an intriguing result since theta is the brain wave state often associated with heightened learning while awake (usually we’re in either the high-frequency, high-alertness alpha or beta states while awake, but it’s thought possible to induce theta state slower in frequency than alpha and beta through concentration techniques).

Review of the Best Wireless Headphones

0

What’s possible in a week? If you dedicated seven days to the achievement of one goal, how ambitious could you make this goal? These were the questions that the multilingual friends Katy and Sara posed themselves when they determined to learn English in one week, to prove that it can be done and anyone can do it with the right methods.

They would attempt to liberate themselves from the distractions and responsibilities of modern-day life in order to cram eight hours of study time and I was observing some of the world’s most capable language learners at work.

The language learning expert: Sara

The friends set themselves the challenge of learning a language in a week in order to stretch themselves, and then it was a question of choosing which language to learn. English presented itself as a natural option; there are nigh on 300,000 English speakers in Germany’s capital, and the areas are dotted with stores adorned with signs in English.

“Truly understanding one’s environment requires one to first understand English”

The first operational step in the friends learning process was to decorate the entire apartment with sticky notes. This had an almost ceremonial touch to it as the friends delved into dictionaries and proceeded to label everything with its corresponding English name.

Within the space of about an hour it was impossible to carry out any menial task, be it making a coffee or flicking off a light switch, without first being presented with at least three different words related to this action.

Sara learning in the park

The importance of the other twin’s presence became immediately apparent as Katy and Sara delegated responsibilities for rooms to decorate with sticky notes. This simple task was augmented by continuous little tests that they would spring on one another, and the fact that they split up their day slightly differently and studied different topics meant that each twin became a source of knowledge for the other.

The most extraordinary moment came towards the end of the week!

The friends simply switched their everyday conversations to English, asking one another if they wanted tea or coffee, were ready to cook dinner or when they were going to leave the house.

Katy and Sara had numerous micro-challenges throughout the week. On the first day they were visited by a English friend who greeted them in English and complimented them on how quickly they’d picked up their first words and phrases.

They then learned the names of fruits and the numbers from one to a billion so that they could visit the English market (although they refrained from purchasing nine hundred thousand kumquats). Displaying their haul after their first functional exchange in English, they beamed with pride and a palpable sense of accomplishment before marching back home to study further.

Katy playing audio lessons

On our second visit to the brother’s apartment 24 hours into the week, we found them sampling dozens of different kinds of English snacks.

Like kids staring at the backs of cereal packs before heading to school, the nutritional information and various special offers and competitions on the packaging were analysed during snack breaks.

There was no moment of complete removal from the language learning process during the eight hours that the friends had allotted to it.

They were constantly using their existing knowledge to support the ever-growing knowledge of English, this being the root of their success.

“you will likely come across words that share common origins with your native tongue”

The friends spent a lot of time engrossed in books or on their computers and apps, flicking and swiping their way through exercises eagerly, but at other times they were to be found searching busily for English radio stations and write-ups of English football games on the web.

There is no definitive method to learn a language fluently

All too often, people enter their weekly language class to converse with their teacher, but then barely have any contact with other speakers and that’s not enough.

The old saying that we can solve problems more effectively when we sleep on it may be especially true if the problem we’re trying to solve is learning a new language.

Motivated Katy out to the library

Researchers from two Swiss universities wanted to know if they could enhance the learning of words from a foreign language by exposing people to the words during non-rapid eye movement sleep the deep, dreamless sleep period that most of us experience during the first few hours of the night.

To find out, they gathered two groups of study participants, all of whom were native German speakers, and gave them a series of Dutch-to-German word pairs to learn at 10 pm. One group was then instructed to get some sleep, while the other group was kept awake.For the next few hours both groups listened to an audio playback of the word pairs they’d already been exposed to and some they hadn’t yet heard.

The researchers then re-gathered both groups at 2 am and gave them a test of the Dutch words to uncover any differences in learning. And indeed there was a difference:

“The group that listened to the words during sleep did better at recalling the words they’d heard”

The simple yet potent trick the researchers employed is known as verbal cueing, and this isn’t the first claim made for its success while sleeping. But what makes this study different is that it puts a finer point on the conditions necessary for this trick to actually work namely, it only works when we’ve already been exposed to the verbal cues before we sleep.

The researchers added a techie dimension by conducting electroencephalographic (EEG)recordings of the sleeping participants brains to track neural electrical activity during the learning period.

They found that learning the foreign words overlapped with the appearance of theta brain waves, an intriguing result since theta is the brain wave state often associated with heightened learning while awake (usually we’re in either the high-frequency, high-alertness alpha or beta states while awake, but it’s thought possible to induce theta state slower in frequency than alpha and beta through concentration techniques).

The Best Tools for Finding New Music and Movies

0

What’s possible in a week? If you dedicated seven days to the achievement of one goal, how ambitious could you make this goal? These were the questions that the multilingual friends Katy and Sara posed themselves when they determined to learn English in one week, to prove that it can be done and anyone can do it with the right methods.

They would attempt to liberate themselves from the distractions and responsibilities of modern-day life in order to cram eight hours of study time and I was observing some of the world’s most capable language learners at work.

The language learning expert: Sara

The friends set themselves the challenge of learning a language in a week in order to stretch themselves, and then it was a question of choosing which language to learn. English presented itself as a natural option; there are nigh on 300,000 English speakers in Germany’s capital, and the areas are dotted with stores adorned with signs in English.

“Truly understanding one’s environment requires one to first understand English”

The first operational step in the friends learning process was to decorate the entire apartment with sticky notes. This had an almost ceremonial touch to it as the friends delved into dictionaries and proceeded to label everything with its corresponding English name.

Within the space of about an hour it was impossible to carry out any menial task, be it making a coffee or flicking off a light switch, without first being presented with at least three different words related to this action.

Sara learning in the park

The importance of the other twin’s presence became immediately apparent as Katy and Sara delegated responsibilities for rooms to decorate with sticky notes. This simple task was augmented by continuous little tests that they would spring on one another, and the fact that they split up their day slightly differently and studied different topics meant that each twin became a source of knowledge for the other.

The most extraordinary moment came towards the end of the week!

The friends simply switched their everyday conversations to English, asking one another if they wanted tea or coffee, were ready to cook dinner or when they were going to leave the house.

Katy and Sara had numerous micro-challenges throughout the week. On the first day they were visited by a English friend who greeted them in English and complimented them on how quickly they’d picked up their first words and phrases.

They then learned the names of fruits and the numbers from one to a billion so that they could visit the English market (although they refrained from purchasing nine hundred thousand kumquats). Displaying their haul after their first functional exchange in English, they beamed with pride and a palpable sense of accomplishment before marching back home to study further.

Katy playing audio lessons

On our second visit to the brother’s apartment 24 hours into the week, we found them sampling dozens of different kinds of English snacks.

Like kids staring at the backs of cereal packs before heading to school, the nutritional information and various special offers and competitions on the packaging were analysed during snack breaks.

There was no moment of complete removal from the language learning process during the eight hours that the friends had allotted to it.

They were constantly using their existing knowledge to support the ever-growing knowledge of English, this being the root of their success.

“you will likely come across words that share common origins with your native tongue”

The friends spent a lot of time engrossed in books or on their computers and apps, flicking and swiping their way through exercises eagerly, but at other times they were to be found searching busily for English radio stations and write-ups of English football games on the web.

There is no definitive method to learn a language fluently

All too often, people enter their weekly language class to converse with their teacher, but then barely have any contact with other speakers and that’s not enough.

The old saying that we can solve problems more effectively when we sleep on it may be especially true if the problem we’re trying to solve is learning a new language.

Motivated Katy out to the library

Researchers from two Swiss universities wanted to know if they could enhance the learning of words from a foreign language by exposing people to the words during non-rapid eye movement sleep the deep, dreamless sleep period that most of us experience during the first few hours of the night.

To find out, they gathered two groups of study participants, all of whom were native German speakers, and gave them a series of Dutch-to-German word pairs to learn at 10 pm. One group was then instructed to get some sleep, while the other group was kept awake.For the next few hours both groups listened to an audio playback of the word pairs they’d already been exposed to and some they hadn’t yet heard.

The researchers then re-gathered both groups at 2 am and gave them a test of the Dutch words to uncover any differences in learning. And indeed there was a difference:

“The group that listened to the words during sleep did better at recalling the words they’d heard”

The simple yet potent trick the researchers employed is known as verbal cueing, and this isn’t the first claim made for its success while sleeping. But what makes this study different is that it puts a finer point on the conditions necessary for this trick to actually work namely, it only works when we’ve already been exposed to the verbal cues before we sleep.

The researchers added a techie dimension by conducting electroencephalographic (EEG)recordings of the sleeping participants brains to track neural electrical activity during the learning period.

They found that learning the foreign words overlapped with the appearance of theta brain waves, an intriguing result since theta is the brain wave state often associated with heightened learning while awake (usually we’re in either the high-frequency, high-alertness alpha or beta states while awake, but it’s thought possible to induce theta state slower in frequency than alpha and beta through concentration techniques).

Mengenal Abstraksi dalam OOP C#

0

A

bstraksi adalah konsep OOP yang menyembunyikan detail rumit dan hanya menampilkan fungsi penting, seperti remote TV yang cukup tekan tombol tanpa tahu cara kerjanya di dalam. Ini membuat kode lebih sederhana dan aman untuk pemula.

Bayangkan smartphone: Kamu cukup tekan ikon kamera untuk foto, tanpa perlu paham sensor atau prosesornya – itu abstraksi dalam kehidupan nyata.

Apa Itu Abstraksi?

Abstraksi fokus pada “apa” yang dilakukan, bukan “bagaimana”. Di C#, dicapai lewat abstract class (kelas tak lengkap, harus diwarisi) dan interface (kontrak method tanpa implementasi). Ini mencegah penggunaan kelas secara langsung dan paksa turunan isi detailnya.

  • Abstract Class: Punya method abstrak (hanya deklarasi) + method biasa.
  • Interface: Hanya method/properti tanpa body (sebelum C# 8, kini bisa default).

Analogi: Resep masak abstrak bilang “panggang 180°C”, turunan tambah “30 menit untuk kue”.

Abstract Class: Kerangka Dasar

Abstract class dideklarasikan abstract, tak bisa diinstansiasi langsung. Method abstrak wajib di-override di kelas turunan.

Contoh Sederhana (Bentuk):

abstract class Bentuk {
    public abstract double Luas();  // Harus diimplementasi turunan
    public void Info() {  // Method biasa
        Console.WriteLine("Ini bentuk geometri.");
    }
}

class Lingkaran : Bentuk {
    private double radius;
    public Lingkaran(double r) { radius = r; }
    public override double Luas() {
        return 3.14 * radius * radius;
    }
}

class Program {
    static void Main() {
        // Bentuk b = new Bentuk();  // ERROR! Abstract
        Lingkaran l = new Lingkaran(5);
        l.Info();
        Console.WriteLine("Luas: " + l.Luas());  // Output: 78.5
    }
}

Ini seperti blueprint rumah: Tak bisa tinggal di blueprint, harus bangun rumah nyata.

Interface: Kontrak Ketat

Interface semua member abstrak secara default (interface), implementasi di kelas yang implement. Satu kelas bisa punya banyak interface.

Contoh (Kendaraan Bermotor):

interface IBermotor {
    void NyalakanMesin();
    void MatikanMesin();
}

interface IEkonomi {
    double HitungBbm();
}

class Motor : IBermotor, IEkonomi {
    public void NyalakanMesin() {
        Console.WriteLine("Mesin motor menyala!");
    }
    public void MatikanMesin() {
        Console.WriteLine("Mesin mati.");
    }
    public double HitungBbm() {
        return 50.5;  // Liter per 100km
    }
}

class Program {
    static void Main() {
        Motor m = new Motor();
        m.NyalakanMesin();
        Console.WriteLine("BBM: " + m.HitungBbm());
    }
}

Analogi: Interface seperti SIM A (motor) + SIM B (mobil) – kendaraan harus patuhi aturan masing-masing.

Perbandingan Abstract Class vs Interface

Aspek Abstract Class Interface
Inheritance Satu saja (:) Banyak (, koma)
Method Biasa Bisa punya Hanya default/static (C# 8+)
Field Bisa Tidak
Kapan Pakai Kerangka umum + shared code Kontrak perilaku spesifik

Pilih abstract untuk “is-a” (Motor is-a Kendaraan), interface untuk “can-do” (Motor can-do Bermotor).

Studi Kasus Latihan untuk SMK

  1. Bangun Perpustakaan: Buat abstract class Buku dengan abstract string Judul() dan virtual void Pinjam(). Turunan: BukuFiksi, BukuNonFiksi. Test di Main, coba instansiasi Buku – error?
  2. Game Sederhana: Interface IAttack (void Serang()), IDefend (void Bertahan()). Class Prajurit : IAttack, IDefend. Implementasi unik, seperti “Pukul pedang” dan “Angkat perisai”. Jalankan simulasi pertarungan.
  3. Toko Online: Abstract Produk dengan abstract double Harga(). Interface IDiskon (double BeriDiskon(10)). Class Laptop : Produk, IDiskon. Hitung harga diskon di Main.
  4. Kendaraan Umum: Interface IJalan (void Jalan()), abstract Kendaraan (abstract int Roda()). Class Bus : Kendaraan, IJalan. Bandingkan dengan Sepeda hanya IJalan.
  5. Mini Project: Sistem Sekolah dengan abstract Siswa (abstract void Belajar()), interface IKelas (void PindahKelas()). Buat SiswaReguler, SiswaKelasKhusus. Tambah polymorphic array Siswa[] dan loop Belajar().

Coba compile di Visual Studio Community (gratis untuk pelajar). Error adalah guru terbaik – debug dan pahami kenapa! Gunakan override tepat untuk method abstrak.

- Advertisement -

Recent Posts