Archive

Posts Tagged ‘Coding’

Class: SomeOne

February 16th, 2009 Fu4ny 3 comments

Cũng ko phải là hết việc làm, nhưng mà ngồi viết chơi cái này :)).
Đọc mỗi tiếng Anh thôi cũng hiểu nhá, chứ ko phải chỉ là lập trình đâu :))
Class SomeOne {
private:
//Basic info
char* name;
char* nickName;
int age;
Date ngaySinh;
//Extra info
double knowFor; //number of year that this person knew me, <0 mean didn't know each other
SomeOne refer; //The one introduce this person to me
//Flag
int isFriend;//-1 mean not know each other, 0 mean not a friend, >1 mean is friend
int isLove;//<0 mean HATE, 0 mean NORMAL friend and ?1 mean LOVE
public:
SomeOne(); //Default constructor
SomeOne( char* newName, int newAge, Date ngaySinh );
void setBirth( Date newNgaySinh );
void setName( char* newName );
void setNickNam( char* newName );
//To be continue
};

Categories: Post Tags: , ,

Coding Convention – Quy tắc code

November 3rd, 2008 Fu4ny No comments

Đang ngồi dịch thì mất điện, 4 ngày nghỉ rồi, chả làm gì cả. Ngồi đọc Coding Convetion kết hợp viết bài cho nó nhớ. Read more...