d d d d d
MCA
First Year
d
School of Distance Education
d d d
Bharathiar University, Coimbatore - 641 046
d d d d d
,
, CONTENTS
Paged No.
UNITd I
Lesson 1 Classesd andd Objects 5
Lesson 2 ClassificationdofdClasses 11
Lesson 3 Abstractions 20
UNITd II
Lesson 4 Constructorsd andd Destructors 25
Lesson 5 OperatorsdOverloading 32
Lesson 6 Inheritance 38
Lesson 7 Arrays 44
UNITd III
Lesson 8 PolymorphismdanddVirtualdFunctions 51
Lesson 9 FiledHandling 60
Lesson 10 Javad Programming 69
UNITd IV
Lesson 11 StringdHandling 89
Lesson 12 GraphicsdanddDrawing 103
Lesson 13 Swing 116
UNITd V
Lesson 14 ExceptiondHandling 133
Lesson 15 Threading 150
Lesson 16 FilesdanddStreams 167
ModeldQuestiondPaper 181
, OOPSd USINGd C++d ANDd JAVAd PROGRAMMING
SYLLABUSdUNI
Td I
Classesd andd Objects:d Natured ofd classd -d Relationshipd amongd classesd -
d Thed interplaydofdclassesdanddobjects.dClassification:dThedimportancedofdproperdclassifi
cationd-didentifyingd classesd andd objectsd -d keyd abstractionsd andd mechanism.
UNITd II
ClassesdanddObjectsd-dConstructorsdanddDestructorsd-doperatorsdoverloadingd-
dTypedconversiond-dInheritanced-dArrays.
UNITd III
Polymorphismd -d Virtuald functionsd -d Filesd -d Exceptiond handlingd -d stringd handling.
Javad programmingd -d Classd scoped -d Controllingd accessd tod membersd -
d creatingdpackagesd-dconstructorsd-doverloadeddconstructorsd-dsetdanddgetdmethodsd-
dfinaldinstancedvariablesd-dpackagedaccessd-dusingdthisdreferenced-dfinalizersd-
dstaticd classdmembersd-ddatadabstractiondanddinformationdhidingd-
dsuperdclassesdanddsubclassesd-dprotecteddmembersd-
dConstructersdanddfinalizersdindsubclassd-dinnerdclassddefinitionsd-
dtypedwrapperdclassdfordprimitivedtypes.
UNITd IV
Stringdconstructorsd-
dStringdmethods:dlength,dcharat,dgetChars,dhashCode,dvaluedofdinterndanddmiscellaneous
dstringdmethodsd-dsubdstringsdanddconcatenatingdstringsd-dstringBufferdclassd-
dstringdTokenizerdclassd-dgraphicsdcontextsdanddgraphicsdobjectsd-
dcolordanddfontdcontrold-ddrawingdlines,drectangles,dOvals,dares,dpolygonsdanddpolylinesd-
dThedJAVA2DdAPId-dswingdoverviewd-dJlabeld-deventdhandlingdmodeld-
dJtexField,dJpasswordField,dJbutton,dJcheckBox,dJradioButton,dJcomboBox,dJlist,dJtext
Area,dJsliderd-dMousedeventdhandling,dAdapterdclassesd-dLayoutdmanagersd-dpanelsd-
dUsingdmenusdwithdframesd-dBoxdlayoutdmanager.
UNITd V
ThedbasicsdofdJAVAdexceptiondhandlingd-dTrydblocksd-
dThrowingdcatchingdanddrethrowingd andexceptiond-dThrowsdclaused-dfinallydblockd-
dClassdthreaddandoverviewd-dThreaddstatesd-dThreaddprioritiesdanddschedulingd-
dThreaddsynchronizationd-dRunnabledinterfaced-dThreaddgroupsd-
dLoadingddisplayingdanddscalingdimagesd-dFilesdandd streamsd-
dCreating,dreadingdanddupdatingdadsequentialdaccessdfiled-
dCreating,dwritingdanddreadingdadrandomdaccessdfiled-dClassdfiled-
dreading,dinsertingdanddupdatingdaddatabased (Used JDBCd tod ad MSd Access).