May 2012
Intermediate to advanced
679 pages
16h 56m
English
Objects can be considered as development over structures. Consider the example of a date. A date forms part and parcel of many programs. It can be your birthday! It may be a maturity date of your fixed deposit. It may be the date when this text file is created. Programmers used to define a structure like:
Struct Date
{ int day;
int month;
int year;
} ;
and later on declare variables of type Date. A pictorial view of Structure Date can be seen in Figure 4.1. If a programmer used this structure in one program, it was not giving him any help or convenience in writing another program. The date could get modified inadvertently and produce errors which are very ...
Read now
Unlock full access