�I�u�W�F�N�g�w��

object ...
�E��,���́E�ړI(�̂���);�ΏہE<���@>�ړI��
objective ...
�E�q�ϓI�ȁE<���@>�ړI�i��
�v���O�����ɂ����� Object �� �\�������ꂽ�f�[�^ �{ ���̃f�[�^�̏����@���L�q

�f�[�^�̍\����

��F����f�[�^(C)
typedef struct {
	char *FirstName,
	     *LastName,
	     *PresentAddress;
	int   BirthYear,
	      BirthMonth,
	      BirthDay,
	} Person;	
�g�����́A���������ȉ��̂悤�ɂȂ�B
...
Person Tsutomu = {"Tsutomu","Kikuchi","Akebono-cho, Kochi",1981,2,16},
       Mariko = {"Mariko","Kikuchi","Akebono-cho, Kochi",1983,10,28},
       Takashi = {"Takashi","Nakamura","Shobuzawa, Fujisawa",1978,8,18};
...
main()
{
...
       printf("Age of %s is %d\n",Tsutomu.FirstName,AgeOf(&Tsutomu))
...
}
...
int AgeOf(Person *person)
{
...
       age=...- (person->BirthYear)...
}
�����ŁA����̃f�[�^����N����v�Z����悤�Ȏ葱���̓f�[�^�ɉ����ǂ̂悤�� ����邩�ɂ���Č��܂��Ă�����̂ł��邱�ƂɋC�Â��ƁAPerson �̒�`�� ���ɂ��̎葱������ꂽ�����悢���Ƃ��킩��B����ɁA�f�[�^�̃Z�b�g�� �ύX�ɂ����ꂼ��葱�����g���悤�ɂ���B�f�[�^�Ƃ��̑���@���L�q���� �v���O�������ЂƂ܂Ƃ߂ɂ������̂��A�I�u�W�F�N�g�ƌĂсA�I�u�W�F�N�g�̒�` �� Class �ƌĂԁB

��F����(C++)

class Person {
	char FirstName[20],
	     LastName[20],
	     PresentAddress[40];
	int  BirthYear,
	     BirthMonth,
	     BirthDay;
    public:
	viod setFirstName(char aName[]);
	void setLastName(char aName[]);
	...
	char* getFirstName();
	int  age(void);
};

void Person::setFirstName(char *aName)
{
	strcpy(FirstName,aName);
}
...
char* Person::getFirstName(void)
{
	return ((char*)FirstName);
}
int Person::age(void)
{
	int a;

	a = ... - BirthYear ...;
	return(a);
}

main()
{
	Person Tsutomu,Mariko,Takashi;

	Tsutomu.setFirstName("Tsutomu");
	...
	cout << "Age of " << Tsutomu.getFirstName()
		<< "is" << Tsutomu.age();
}

Java �͉������ꂵ���̂�

Java�ł̃v���O���~���O

���P���̃v���O�����̃R���p�C���Ǝ��s�B
F:\home\papa\java>javac ex01.java
F:\home\papa\java>java Hello
Hello!
class �Ŏw�肵�����O�� .class �t�@�C�����ł��邱�Ƃɒ��ӁB

Applet �v���O���~���O�̗� (class �̖��O�� .java �t�@�C���̖��O�ɂ���K�v������...�炵���B)�R���p�C���Ǝ��s�́A

F:\home\papa\java>javac HelloApplet.java
F:\home\papa\java>appletviewer Hello.html
Netscape �ł݂����Ƃ��ł���B
CLASSPATH=.;g:\java\lib\classes.zip;c:\Program Files\Netscape\Navigator\Program\Java\classes
PATH=G:\NETPBM\BIN;G:\JAVA\BIN;C:\PTEX\BIN;C:\DJGPP\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\MWW\DLL;C:\MWD\MANAGER;C:\THINKPAD;
�̂悤�� PATH, CLASSPATH �̐ݒ�����Ă����K�v������܂��B

���̑��� applet ���������Č��悤�B �v���O�����̗����͕K���������₷���� �������A�ǂ����ǂ��ς���Ɖ����N���邩�����Ă݂�ƁAApplet Programming �̗������i�ނł��낤�B


���܂�

�I�u�W�F�N�g�w���̓���