Sunday, December 27, 2009

FUNCTION main

Function is a base of C++ program arrangement. So, it will always be exist in C++ program. At least, you'll have one function in your C++ program. This essential function is called as "function main."
#include

void main()
{
        cout << "Welcome to C++";
}
In the program above, main is the name of the function. Meanwhile, void is a statement to state that the function has no return value.

Everything shown from "{" to "}" is called as block. "{" is to show the beginning of the program, and "}" is to show the end of the program.


The character "(" and ")" are used to fill the argument of function main. In the example above, the () is empty. It means that the function main has no argument.

#include

#include

void main()
{
         cout << "Welcome to C++";
}
#include is used to command the compiler to use the file "iostream.h"

iostream.h is a header file which is already installed inside the compiler. iostream.h is needed inside the program above, because the block ( marked by "{" and "}" ) uses cout.  

cout itself is used to out: Welcome to C++ on the screen as the standard output of C++ compiler.

Saturday, December 26, 2009

EXAMPLE OF C++ PROGRAM

Below is one example of C++ program.

#include

void main()
{
         cout << "Welcome to C++";
}

The program is so simple, but it's ready to run in a C++ editor/compiler, such as Borland C++, Visual C++, Microsoft C/C++, Turbo C++, etc.

The program above will appear: Welcome to C++ as the output on the computer screen.

Friday, December 25, 2009

ABOUT OBJECT ORIENTED PROGRAMMING

The main concept of Object Oriented Programming (OOP) is to combine data(s) and function(s). We can imagine an object as a department in a university. There are lots of departments in a university. It means: there are lots of objects.

Each department has its own function. Electrical engineering dept. has the objective to produce electrical engineering scholars. Meanwhile, accounting department has to produce accounting scholars. But, both have the same mission. It's to reach university's vision, such as to form good generations.

If a department wants to reach its objectives, it must have a workplan and executors (who will execute the plans). In OOP, it means: an object must have data (instant variables) and function (methods).

In OOP, a university can be analogized as a "class," because class - itself - means: the unit of several objects. So, we can draw the relationship among data; function; object; and class such the graphic below.



OOP has the characteristics below:
  1. Encapsulation means that data and function have the same position in an object. Usually, data is treated as the second component - after the function.
  2. Inheritance means that a class' characteristic can also be generated to another class. If a whale has a large size, the other whales can also have the large size.
  3. Polymorphism means that one thing is possible to have more than one form. Water is possible to be solid, fluid, or gas.

Thursday, December 24, 2009

KAMU TAK SUKA?

Oleh: 'Ammar Lelo Andiko A. A.
 

Kali pertama ku lihat itu mata, ku yakin ku suka
Lebih lama lagi..., ternyata ku masih sama
Menahun menyimpan rasa, tanpa terasa
Namun tetap ku percaya, 'kan jadi nyata akhirnya

Ku lihat pantai hingga cakrawala
Menjangkau pandang hingga adanya
Ku terawang balik gunung di sana
Melompatkan jauh ku punya jiwa

Dalam malam ku impikan hadirnya
Engkau tersenyum pun tertawa
Fantasi buncahkan asa
Gapai lebihi dunia nyata

Anganku terus bertanya-tanya
Apakah berhasil ku punya usaha?
Adakah dia suka?
Akankah angan jadi nyata?

Janjiku tetap ada
Kesungguhan masih tercipta
Lemah hanya karena tak percaya
Mengapa tiada dia bertanya bila dia suka?


Malang, December 24th 2009

ABOUT C++

C++ is related to C language. It's a kind of programming language, which was created by Bjarne Stroustrup in Bell Laboratory at 1983. C++ was created approximately ten years after C. C itself was created by Brian W. Kernighan and Dennis M. Ritchie at 1972.

At the beginning, C++ was being called "a better C." Then, Rick Mascitti gave the name "C++" in the summer of 1983.

C++ is based on C, because of the portability of C language. C can be used and applied on many machines - started from PC to mainframe. It's also compatible to the popular OS (Operating Systems), such as DOS, MS Windows, UNIX, Linux, VMS, and so on. The library in C language is also used in C++.

C++ is capable to Object Oriented Programming (OOP). It makes C++ special to be learnt by programmers. But, it's not pure OOP. It's just a hybrid language.

The reason of C++ existence is to enlarge programmers' creativity and productivity in making and also developing various applications. C++ is capable to minimize the complexity of making an application, esp. a large application (more than 10,000 lines/rows). The using of C++ language can double a programmer's productivity, than using of other languages; such as C, Basic, and Pascal. It's caused by the reusability of C++.

Friday, December 18, 2009

HARDWORKER

By: 'Ammar Lelo Andiko A. A.
 

Morning is started by a warming light
The grasses are still wet by the dew last night
Birds start singing as my ears listening them right
And the air gives us freshness it might

Your skin spreads soap's well perfume tight
A cassava, a cup off coffee fill your stomach right
Your steps shake the woody floor as your sharp sight
Tell the world whether you are ready to fight

You will come home at the depth of night
When everybody's lying on the bed right
But you can still share the smile light
As touching as your steps and sight

Your dedication is right
The schedule is said too tight
But it earns the strong light
How can I be like you to fight?


Malang, December 18th 2009

Tuesday, December 15, 2009

MEREKA ITU...

Oleh: 'Ammar Lelo Andiko A. A.

 
Dunia...!
Betapa berat bebanmu menanggung manusia
Mereka hanya memikirkan diri seorang saja
Yang mereka bilang benar hanyalah pura-pura
Padahal merekalah bandit sesungguhnya
Bak orang terzalimi lagaknya
Memedih pilu omongannya
Merendah sendu dia punya nada
Bermuram durja ia di depan semua

Mereka berlagak mengerti
Mereka seolah peduli
Mereka kira yang paling punya hati
Namun sekali lagi: mereka hanya pikir diri sendiri

Dunia...!
Mereka itu durjana
Tak tahu balas jasa
Tak pikir sekelilingnya
Asal dia perlu terpenuhi semua

Dunia...!
Tak pantas banyak bermanis kata pada mereka
Berujar pedas sudahlah sepantasnya
Agar kita tegar tahu mereka
Biar kita tak dipandang remeh olehnya
Supaya tak seenaknya lain ketika

Ini hari kata menembus hati
Kalimat langsung tak mengenal basa-basi
Biarlah segala itu terjadi
Tiada yang perlu disesali

Dunia...!
Kadang mereka tertawa
Melempar ejekan pada pembela

Biarkanlah itu!
Biar sajalah mereka begitu!
Mereka tiada menahu
Hanya segerombolan penipu
Yang sama buruknya dengan benalu
Saat beroleh peluang di balik punggungmu

Mereka tak peduli menimpakan wajahmu dengan plastik
Yang penting wajahnya tetap tampak cantik
Tak tahu cara menyiram taik
Apalagi menanam lagi apa yang telah mereka petik

Dunia yang pilu!
Walau lelah kau memberi tahu
Janganlah pernah meragu!
Hibur sajalah dirimu!
Dengarkan lagu-lagu merdu!

Dunia yang semrawut!
Pada pundakmu harap masih bergelayut
Selamat masih akan menyambut
Walau air kehidupan terasa kecut
Kau tak akan jadi pengecut
Tak akan ikut mereka minum kamput


Malang, 15 Desember 2009

TIRED

By: 'Ammar Lelo Andiko A. A.

My face seems sad
My eyes are red
My tongue says bad
My ears are sped

My hands are landed
My feet step mad
I need to go to bed
Lying on dreams I had


Malang, December 15th 2009

Sunday, December 13, 2009

FAKE

By: 'Ammar Lelo Andiko A. A.


You smile on me
You talk nice to everybody
You laugh as everyone is happy
You joke like no matter to be

But... where are your words when they're needed?
Where is the promise while it should be executed?
Are they down just by a hit?
Is it so hard to meet?

You walk down the street like an actor
Turn around spreading your well odour
Pretend to give me some favor
Talk to ones like Mr. Governor

But... the steps have too many doubts
The turn breaks somebody's hopes
The pretenders can't deliver cups of soups
The talk just ties people with ropes

I waited for your change
Someday ago I saw a glance
But I was just tired sitting on a bench
Now it's hard to believe whether you'll have a sense


Malang, December 13th 2009

Saturday, December 12, 2009

NEVER LIE TO YOUR CUSTOMERS!



Lie is a very very bad effort to reach something we want. But, we often did it because of several reasons.

But..., in business world it's not allowed. It's completely forbidden. Why?

Try to imagine whether you lie to somebody you owe! You don't pay the money you should give. Then, someday you will borrow his/her money again. Do you think that he/she will lend you the money again? I don't think so, Mate.

Nah! The same thing can also be happened if we trick our customers. As a good seller, we may not do that, if we don't want to lose our store's visitors.

In  many cases, businessmen or entrepreneurs did a lie to their customers without being realized. They gave an advertisement which trapped the customers in a wrong perception. It's a big mistake.

For the example, Mr. X promotes the new beverage of his restaurant. He wrote in a giant billboard, "FOR 50 CENTS, YOU CAN FEEL THE FRESH"

Then, an old man comes to his restaurant. He is a beggar, thirsty, and he has only 50 cents on his hand. But actually, a glass of the beverage is priced for 55 cents, because of 10 % tax. The old man becomes disappointed then. He just walks out the restaurant within his eyes staring on the floor, because he's failed to feel the fresh like displayed on the billboard.

Perhaps, we will be sad in seeing such situation - other side, we don't blame Mr. X.

But actually, Mr. X's advertisement should explain whole price "clearly" that a customer should pay. Even though it's a simple matter; if we stand as the old man, we'll feel cheated of course - because we could not get what we had planned. We made a plan as far as we knew.

So, do we think that the old man will come again to the same restaurant someday???

Mr. X is hopping the big income from his advertisement, but in other side he potentially cheats the customers. It will be meant: he can damage his business.


PS: A good information is something clear to see.

PUBLIC'S ENEMY NO. 1

What is the public's enemy no. 1? Is there someone of you who can guess it?
........................
Yes! If you answer "corruption", it's going to be right.

Why???

Here are the reasons why we can tell corruption as public's enemy no. 1.

First
Corruption is amoral attitude - while we see it from positive law, even from religious view. A grafter will be seen as a villain in the eyes of most people.

Second
Corruption is similar to stealing other people's rights. So, it will give the disadvantages to some people surely.

Third
Corruption is not only able to damage one side, but also many sides. It can break social structure and system. It brings domino's effect in a long period. So, it potentially makes society collapsed. Many countries or nations had ever felt this situation.

Fourth
Corruption will not break physical structures only, but also mental structures. In a corrupt country, the judges; police; and other law enforcement agents, have a big potency to be dishonest, non-dedicated persons. If there's no leader to be trusted, people will act as they like (in law or not).

Fifth
A corrupt country will lose its legitimation. If this situation's happened to the government or executive side, step by step the country will be collapsed.

Sixth
Corruption take the chances of a nation to develop and to raise, because in a corrupt government; there are no free education, health care, or other basic needs for citizens.


Last
However, corruption will attack the actors at last - soon or later. If you do the right thing, it will come to you; and vice verse. Take a look around the grafter's hood or family! Is it good - in a real meaning?

So, will we still be interested to be corrupt persons?