ss_blog_claim=b2c8801cecb8aefe7201c97184ef9ab3 C++ Community of PSMZA

Tuesday, May 20, 2008

what is C# ?

There has been BCPL, C, and C++; Microsoft recently introduced yet another language in the same naming tradition: C# (pronounced "C sharp"). C# is a language designed to be fully compatible with Microsoft's .NET initiative while taking advantage of what has been learned from C and C++ (as well as Java).

C# is designed to be a platform-independent language in the tradition of Java. It's syntax is similar to C and C++ syntax, and C# is designed to be an object-oriented language. There are, for the most part, minor variations in syntax between C++ and C#. Main has no return type, there are no semicolons after class names, there are some (to C++ programmers) strange decisions regarding capitalization - such as the capitalisation of Main. Other a few differences, the syntax is often the same. This decision is reasonable, in light of the fact that C syntax has been used with several other languages - notably Java.

Similar to Java, C# does not support multiple inheritance; instead it provides Java's solution: interfaces. Interfaces implemented by a class specify certain functions that the class is guaranteed to implement. Interfaces avoid the messy dangers of multiple inheritance while maintaining the ability to let several classes implement the same set of methods.


Another helpful feature of C# is garbage collection. Therefore, it is unnecessary to include a destructor for each class unless a class handles unmanaged resources; if so, it's necessary to release control those resources from within the class (The Finalize function is used to clear up these unmanaged resources; it can even be abbreviated with the same syntax as a C++ destructor). Of course, C# also provides direct access to memory through C++ style pointers, but these pointers are not garbage collected until specificially released by the programmer.

click for more info :: http://www.cprogramming.com/tutorial/csharp.html

Sunday, May 4, 2008

Polimorfisme

Polimorfisme membolehkan objek yang berbeza meggunakan fungsi anggota(mesej) yang sama tetepi....membawa kesan yang berbeza. Kesan bergantung kepada jenis objek yang dirujuk.

contohnya....rupa bentuk geometri fungsi anggota KIRA_Luas untuk mengira keluasan objek geometri boleh juga digunakan untuk mengira keluasan mana-mana jenis objek geometri dan hasilnya bergantung kepada bentuk yang dirujuk.

Polimorfisme boleh dilaksanakan melalui perwarisan. Ia boleh membentuk sati hierarki kelas terbitan dan fungsi anggota yang berkenaan ditakrif semula untuk menyesuaikan dengan kelas terbitan. Dengan itu fungsi anggota yang sama boleh digunakan ke atas beberapa kelas yang berkaitan.

contoh :

Arahan: Keluarkan duit dari mesin ATM

objek1: mengeluarkan dari mesin ATM di Bank Islam
objek2: mengeluarkan dari mesin ATM di CIMB

Monday, April 28, 2008

Create game by C++



Video yang saya attachkan ini adalah beberapa sebahagian game yang dibina menggunakan beberapa tools iaitu DevC++ dan library Allegro (ada boleh download..sorry saya xsempat nak sisipkan link). Semenjak terlibat dalam pembangunan diploma dalam game dev. aku berniat akan cuba meng-expose kan diri sebagai coder untuk men-develop game. Langkah kanan ku dengan memntelaah buku C++ Making Game dan menyelongkar store bilik dan bertemu dengan buku C/Allegro...huhu. Semoga berjaya!

Sunday, April 27, 2008

Perwarisan dalam C++

Perwarisan adalah cara mengunakansemula kod yg telah dibina bagi suatu kelas yang sedia ada. Konsep ini sama seperti anak-anak mewarisi sifat ibubapa. Oleh demikian, anda boleh membina kelas yang mewarisi data ahli & fungsi ahli dari kelas yang sama. Kelas Asas adalah kelas yang sedia ada, manakala kelas Terbitan adalah kelas yg diterbitkan dari kelas Asas. Kelas terbitan mewarisi kelas asas.kaedah ini bertujuan untuk menjimatkan masa dan tenaga. Cuma anda perlu tambah(sekiranya perlu) di data fungsi atau fungsi ahli dalam kelas terbitan.


Terdapat dua kondep perwarisan dalan C++:

1. Perwarisan Tunggal:

kelas asas <----kelas terbitan C<---- kelas terbitan B

2. Perwarisan Pelbilang

kelas terbitan A <-----Kelas B -----> kelas terbitan C


Sintak bagi perwarisan ialah:

class NamaKelasterbitan: penentu capaian Kelasterbitan
{

data ahli;
fungsi ahli;
}

*penentu capaian = private, public, & protected


contoh aturcara:

class Bentuk
{
private:
int unit;
public:
int ID;
Bentuk( )
{ cout<<"Saya adalah bentuk"<< endl;
}
};

class Bulat: public Bentuk
{
public:
Bulat( )
{
cout<<"Saya bentuk bulat"<< endl;
}
}

kelas bulat mewarisi secara public dari kelas bentuk. Oleh itu data dan fungsi ahli diwarisi oleh kelas bulat. Walaubagaimana pun data ahli (private) bagi kelas Bentuk tidak dapat diwarisi oleh kelas bulat.

Schema Question 2: Practicaal Test 1

#include

class Barang
{
public:

int barang[4],purata;


public:

void bacanilai()

{ int jum=0;


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

{
cout<<"Masukkan barang["<< i <<"] nilai barang RM:"<< endl;
cin>>barang[i];
jum+=barang[i];

}

cout<<"jumlah terkini RM:"<< jum << endl;
purata = jum / 5;

}

void paparnilai()

{ cout<<"jumlah harga 5 barang seluruh RM:"<< jum << endl;
cout<<"jumlah purata 5 barang seluruh RM:"<< purata << endl;

}

};

void main()
{ Barang barangA;
barangA.bacanilai();
barangA.paparnilai();
}

Wednesday, April 23, 2008

Most Popular Programming Langugage


Tiobe.com: 11 May 2007

1. Java - 19.1%
2. C - 15.2%
3. C++ - 10.1%
4. PHP - 8.7%
5. Visual Basic - 8.4%
6. Perl - 6.2%
7. Python - 3.8%
8. C# - 3.7%
9. JavaScript - 3.1%
10. Ruby - 2.6%
11. Delphi - 2.1%

Dice.com: A September 2006

1. Java - 35.7%
2. C, C++ - 15.3%
3. C# - 12.7%
4. Perl - 11.9%
5. JavaScript - 10.9%
6. Visual Basic .NET - 5.2%
7. PHP - 2.9%
8. Ajax - 2.7%
9. Python - 2.0%
10. Ruby - 0.7%

Evans Data:Winter 2006

1. Java - 45%
2. C, C++ - 40%
3. C# - 32%
4. Ajax - 28%
5. Visual Basic & VB.NET - 21%

Computerworld: In early 2005

1. C# - 72%
2. Java - 66%
3. Visual Basic - 62%
4. C++ - 54%
5. JavaScript - 50%
6. Unix Shell Scripts - 42%
7. Perl - 34%
8. C - 32%
9. PHP - 16%
10. Python - 8%
11. Delphi - 7%
12. TCL - 6%
13. Ruby - 1%


Monday, April 14, 2008

Project 1 C++ : Create C++ Tutorial Book

Book Title: C++ Tutorial Collections
Syarat:

1. Buku perlu mengandungi tutorial meliputi topik yg telah dipelajari.
2. Setiap topik perlu mengandungi 2 contoh tutorial beserta keluaran/output. Pastikan anda compile dan run setiap code yang anda pilih. Bukan copy&paste. Sertakan ulasan code tersebut.
3. Tutorial hendaklah diperolehi dari buku rujukan (library) atau URL/Web atau kedua2nya.
4. Gunakan font style Verdana bersaiz 8
5. Projek adalah individu.
6. Buku perlu disertakan kulit ( sila design guna photoshop ) + serta isi kandungan.
7. Di kulit belakang sertakan nama, no matrik, gambar ukuran ic & kursus anda.
8. Hantar pada 3 Mei 2008.
9. Markah di nilai melalui kesesuaian, relevan setiap topik & tutorial+output+ulasan, penampilan buku termasuk kulit & kekemasan.
10. Hantar dalam bentuk hardcopy & softcopy.

Sunday, April 13, 2008

Public, Private & Protected

C++ membolehkan pengaturcara menentukan capaian kepada ahli data dan fungsi ahli g ditakrifkan dgn menggunakan penentu capaian yang berlabel "public", "private", atau "protected".

"...ahli data atau fungsi ahli yg berlabel publis boleh dicapai dari luar kelas melalui nama sesuatu objek.."

"...manakala jika berlabel private atau protected cuba boleh dicapai oleh fungsi ahli atau fungsi rakan (friend)..."

...ini bermakna capaian private menghalang capaian dibuat dgn sewenang-wenangnya oleh fungsi yg bukan fungsi ahli kelas tersebut.

...data2 sulit biasanya dilabel sebgai provate di dalam kelas ia utk mengelakkan data diubah suai atau di rosakkan dari luar

...

Saturday, April 12, 2008

Practical Test 1: C++

To Sit2-S2 ;

Your first Practical Test will be on:

Day: Friday

Date: 17 April 2008
Topics: Object /Classes & Function

Vanue: eCOM1
Group:

1. Group A : 19 persons ( f004-f052 )
2. Group B : 19 persons ( f054-f110) + ( f559, f567 )


Time: 1 hour

1. Group A-3.00 pm untill 4.30 pm

2. Group B- 4.30pm untill 6.00 pm






Sunday, March 23, 2008

Project I :: Game

Follow the directions below:

1.This is a individual project.
2.Find 'simple' games source code using C++[internet or books].
3.Understand & explain details the flow of source code.
4.Modify & change the code
[but not the main code, if u want change the main code make
sure u are understand the code's flow].
5.Compile & Execute.


*Submit on 2nd week of May 2008.
*Find 'simple' game source code.
*No xerox activity.
*Total marks 50.
* You can use link games on right at cpulas2.blogspot.com

Saturday, March 22, 2008

WANTED: C++ PROGRAMMERS

earth247.com Jobs

WANTED: C++ PROGRAMMERS
Earth247's vision is to be: The global news platform of the digital age, by integrating journalistic values with power of users to shape and share news. As such we are looking for contractual or freelance programmers to assist us in this new endeavor. We seek the following professionals:
System Analyst (1 position): Study user requirements, develop UML diagram, systems integration and assist in the development of manuals and process documentation
C++ Programmers (2-3 Positions): Develop Earth247 components, conduct unit and systems testing
The above requires background in video streaming, social networking sites and widgets developments.
If you are keen, please email to sean@earth247.tv or contact 016-6533533

Tuesday, March 11, 2008

C++ Theory Test 1

C++ Theory Test

Day: Monday [nite of Tuesday]
Date: 17 March 2008
Time: 800pm-1000pm [nite]
Topic: Structure[selection&loop]+Array+Pointer.

Please be ready!

Assigment 2 [SIT2-S2]

Politeknik Sultan Mizan Zainal Abidin Terengganu

Jabatan Tek. Maklumat & Kom.

F2010 – C++ Programming

Topic: Array&Pointer.

Finds 1 programme
C++ code using:

1. Array with 1 & 2 matra.

2. Pointer.

3. Explains how the code execution & output for question 1 & 2.

* need reference books or Web URL[5marks].
* submit next Sunday.
* no xerox activity!!



Thursday, February 21, 2008

Game Development Programmer

Game Development Programmer
(Kuala Lumpur - Seri Petaling)

Responsibilities:

  • Create / design Game

Requirements:

  • Require skill(s): C++, Win 32, Direct X, Action Script 3
  • Required language(s): Chinese, English
  • Applicants must be willing to work in Seri Petaling.
  • Applicants should be Malaysian Citizens or hold relevant residence status.
  • Full-Time position available.
  • Please attach your relevant game project.
  • Experience is added advantage.

Run Up Game Distribution & Development Sdn Bhd
38F-4, (Zone J3),
Jalan Radin Anum,
Bandar Baru Sri Petaling,
57000 Kuala Lumpur.
Tel:03-90570968 or Fax:03:90570969
E-mail: runupjobs@runup.com.my

TicTacToe

Wednesday, February 20, 2008

Sunday, February 17, 2008

Assigment 1a - Selection Structure

Politeknik Sultan Mizan Zainal Abidin Terengganu

Jabatan Tek. Maklumat & Kom.

F2010 – C++ Programming


Read :

From output below, write the C++ programme.

Output1:

Enter your option 1, 2, or 3: 1

You entered option 1

Press any key to continue

Output 2:

Panjang : 10

Lebar : 5

Luas : 50

Press any key to continue


Output 3:

Masukkan umur anda (tahun) : 28

Anda Dewasa

Press any key to continue

Monday, February 11, 2008

about.com for URL reference!


























The way to get extra knowledge you must know which URL that able to assist you. This is 1 of URL or portal that will assist you to enchance your 'ilmu' or be a 'guru' or be a reference while compeleting C++. TQ

C++ Challenges

Need to view and read...interesting! C++ challenges! Challenges yourselfe..click here

Lab Report Format
















This is your lab format report for C++ lab. Please use font Concolas or Verdana with 9 in size. Please submit hardcopy on Thusday.

Thursday, January 31, 2008

Assigment 1

Politeknik Sultan Mizan Zainal Abidin Terengganu
Information Technology & Comm. Department
F2010 – C++ Programming

Assigment 1

Read:

1. Individual assigment
2. Submit 10 Feb 2008 (Sunday)
3. Please give reference book or address of internet web/URL used.


Topics to find:

1. Introduction to C++:

a. What is type of variable and how to define/ declare variable.
b. What is keyword use in C++.
c. What is comment in C++.
d. Find input and ouput in C++.
e. What is math.h and sample programming using library math.h
f. How to write C++ programming ( stepbystep) . Give your example.
g. Find 5 simple programming (code) using C++.

2. Find another:

a. Mathematic operatior use in C++.
b. Give sample programming in each math operator.

3. Please refer to books of C++ or web/url ( internet or click http://cpulas2.blogspot.com)


Wednesday, January 30, 2008

Tuesday, January 29, 2008

Sunday, January 27, 2008

Download C++ Note

Download C++ note at mamperla.net

Video as assistence

To all student that want to learn basic of C++ you can select tutorial shown by video on your right. Learn more from video its easy to improve your comprehension about kind of language. TQ.

certificate of IT a.k.a SIT

Fokus + Understand + Dont Play2 = myAdvice to Them

First Birth of C++ Community for PSMZA

This blog is the place that we can shared anything about c++ programming especially to PSMZA students that interest with C++. Hope u can give comment about what ever here. Thank you from us.