CHow to Programdoc.docx
- 文档编号:29826255
- 上传时间:2023-07-27
- 格式:DOCX
- 页数:21
- 大小:25.89KB
CHow to Programdoc.docx
《CHow to Programdoc.docx》由会员分享,可在线阅读,更多相关《CHow to Programdoc.docx(21页珍藏版)》请在冰豆网上搜索。
CHowtoProgramdoc
TOUROCOLLEGECOURSESYLLABUS
LANDERCOLLEGE
DEPARTMENT:
ComputerScience
COURSETITLE:
DataStructures
COURSENUMBER:
MCO242
PREREQUISITES:
MCO232
CREDITHOURS:
3
DEVELOPER:
MiriamPlonczak
LASTUPDATE:
July2003
COURSEDESCRIPTION
ThiscourseexploresthemoreadvancedconceptsoftheObjectOrientedDesignandProgrammingparadigmincludingoperatoroverloading,inheritanceversuscomposition,polymorphism,run-timeversuscompiletimebinding,multipleinheritance,shallowversusdeepcopying,exceptionhandling,andfunctiontemplates.Inaddition,thebasicfileI/Ooperationswillbecovered.Somebasicdatastructuressuchasstacksandqueuesmaybeintroducedaswell.Studentswilldevelopapplicationsthatimplementtheseobject-orientedconceptsusingC++.
COURSE/DEPARTMENTALOBJECTIVES
Thestudentswillbeableto:
Explainwhenstaticdatamembersareusedandhow
Differentiatebetweenclassstaticdatamembersandclassdatamembers
Giveanexampleofanoverloadedoperatorandexplainhowoverloadedoperatorsareusedtomakeclassesactlikebuiltindatatypessuchasintandfloat
Developcodethatimplementsavarietyofoverloadedoperatorsforaparticularclass
Usememorymanagementtechniquessuchasdynamicmemoryallocation,releasingdynamicallyallocatedmemory
Manipulatestringsinavarietyofways:
usingcharactersarrays,usingchar*pointers,usingtheC++stringclass
Differentiatebetweenthedifferentwaysstringscanbemanipulatedandidentifytheadvantagesanddisadvantagesofeachtechnique
UseC++libraryfunctionstohandleC-stringssuchasstrlen(),strcpy(),strcat(),strcmp(),strstr()
Explainwhatismeantbymemberwisecopyandwhatproblemsitmightcause
Explainhowcopyconstructorssolvetheproblemofmemberwisecopy
Demonstratewhencopyconstructorsarenecessary
Differentiatebetweenacopyconstructorandaconvertconstructor
Explainwhenclassdestructorsarenecessary
Differentiatebetweenaconvertconstructorandobjectconversionusingtheoverloaded
DefinethefollowingOOPconcept:
composition
DefinethefollowingOOPconcepts:
inheritance,polymorphism
ExplainhowtheconceptofinheritanceisimplementedusingC++
Explainhowinheritanceandcompositionprovidescodereusability
Compareandcontrastcompositionandinheritance
Demonstratehowpolymorphismisimplementedusinginheritancewithvirtualfunctions
Compareandcontrastprivateversuspublicinheritance
Identifytheaccessibilityofdatamembersandmemberfunctionsthatweredeclaredprivate,public,orprotectedtoclassmemberfunctions,toinheritedclassmemberfunctionsandtooutsidememberfunctions
Explaintheadvantageofusingprotecteddatamemberswithinaninheritancehierarchy
Identifytheorderinwhichconstructorsanddestructorsareinvokedwhenderivedclassobjectsareinstantiated
Identifythepitfallsofmultipleinheritanceandhowtheycanbeaddressed
Explainhowinheritancecanbeusedtospecializeorgeneralizeabaseclass
Explainhowinheritancecanbeusedtohidedatamembersand/ormemberfunctionsofabaseclass
Listtheadvantagesanddisadvantagesofdynamicversusstaticbinding
ExplainhowdynamicbindingisimplementedinC++usingvirtualmethods
Explainanddemonstratewhyvirtualdestructorsmightbenecessaryifdynamicmemoryallocationtakesplaceswithinabaseandderivedclass
ListseveralreasonsthatC++allowsustodefinefriendfunctions
Usetheifstreamandofstreamobjectstoaccess,processandstoredataondiskfiles
Identifyfstreamclassmemberfunctionsandhowtheyareused:
open(),is_open(),operator!
(),fail(),eof()
Explainwhyitisimportanttocloseafilewhenitisnotbeingused
Differentiatebetweentextfilesandbinaryfileformats
Differentiatebetweensequentialfileandrandomfileprocessing
Explainwhydelimitersarenecessaryinordertoprocesstextfilesandwhyblankscannotalwaysbeusedasdelimiters
Developcodethatimplementsexceptionhandlingtechniquesusingtry,catchandthrow
Explainwhydesigningaclassthatthrowsexceptionsmaybemorepreferablethandisplayingerrormessagesonthescreen.
Explainhowusingtemplatesallowsustoimplementgenericclassesorgenericfunctions
Explainwhytheimplementationofoperatoroverloadingisintrinsictotheuseofmanytemplates
Givenspecificationsofaclass,writeC++codenecessarytoimplementaclass,includingdefault,copy,andconvertconstructors,destructors,memberfunctions,overloadedoperators,variouslevelsofaccessibility(public,privateandprotected)
DemonstratehowC++implementsinheritancebydefiningbasedandderivedclasses
Givenahierarchyofclasses,identifywhichdatamembersandmemberfunctionsareaccessiblebasedontheaccess-specifierusedwhenthederivedclassisininheritedfromthebaseclass
COURSE/INSTITUTIONALOBJECTIVES
Thiscourseisintendedtofine-tunetheanalyticalandtechnicalskillsstudentsneedtofunctioninourincreasinglytechnologicalsociety.ThiscourseprovidesstudentswithextensiveexperienceindevelopinganddebuggingcomplexC++codetosolvecomplicatedbusinessandmathematicalproblems.Itservestopreparethestudenttopursueacareerinthehighlycompetitivefieldsofcomputerprogrammingand/orsystemsanalysis.
COURSECONTENT
Gaddisbook:
Chapters7,11,12,13,14,15
Deitelbook:
Chapters7,9,10,12,13,14,20,21(Section21.7)
Classes
Compareandcontrastdifferenttypesofconstructors
Explaintheimportanceandsignificanceofusingheaderinitialization
get()andset()methods–whyaretheynecessary?
inlinefunctions–whatadvantagedotheyprovide?
Whatarethelimitations?
Introduceconceptsofdatahidingandencapsulation
Explainhowoverloadedfunctionsareidentifiedwithargumentsignatures
Demonstratehowtoinvokememberfunctionsto"sendmessages"toaninstanceofaclass
Usepointerstoclassobjects
Explainwhentousestaticdatamembersandstaticmemberfunctionsandhowtheydifferfromregulardatamembersandmemberfunctions
Giveexamplesoffunctionsandclassesthatmightbedeclaredfriendsofotherclassesandexplainwhy
DynamicMemoryAllocationandMemoryManagement
Discussmemorymanagementprovidedbycstringfunctions.Whyisthe'\0'soimportant?
Discusshowmemoryismanagedwhenstructsandclassesareused.Howisamemberwisecopyperformed?
Whatisthedifferencebetweenadeepandshallowcopy?
Dynamicmemoryallocation-howandwhyisitused?
Howandwhythecopyconstructorandoverloadedassignmentoperatorareusedforclassesthatperformdynamicmemoryallocation
Explainhowtousethethispointer
OperatorOverloading-ConceptsandImplementation
overloadingthe+,-,++(postfixandprefix)
overloadingrelationaloperators
overloadingstreaminsertionandextractionoperators
overloadingthe[]operator
conceptofoperatorstacking
objectconversionusingconvertconstructorsandoverloadedcastoperator
creatingastringclassthatsupportsoverloadedoperators
Objectcomposition-conceptandimplementation
Demonstratehowobjectcompositionallowsustoreusecode
Demonstratewhytheouterobjectmustprovideadditionalmethodstoallowaccesstotheobjectsthatitcontainssincetheirmethodsandattributesarehiddenfromoutsideview
Showhowauserinterfaceswithjusttheouterclassandhowthatclasspassesalongthemessagestotheobjectsitcontains.
CharacterManipulation
datavalidation
charactercaseconversion
I/Ousingcharacterarraysandthecinobject
libraryfunctionsthatmanipulate"strings"
string/numericconversion
usingtheC++stringclass
Inheritance
Whatisinheritance,when,howandwhyitisused
Whateffectdoesaccessspecificationhave?
public,private,andprotected
Whendoweuseeachtypeofspecification?
constructorsversusdestructorsinaninheritancehierarchy
Functionoverridingversusfunctionoverloading
Whatispolymorphism,whyandhowisitimplementedinaninheritancehierarchy?
Differentiatebetweenearlybindingandlatebinding.Enumerateadvantagesofeach.
Whatisavirtualfunction,howisitimplementedandwhatpurposedoesitserve
Whatisapurelyvirtualfunction
HowisRTTIusedwithpolymorphismtoidentifytypeswithinaninheritancehierarchy
Howisdynamiccastingusedtoconvertobjectswithinaninheritancehierarchy
Whatisanabstractbaseclass,howisitimplementedandwhymightitbeused?
Whatarethedrawbacksofmultipleinheritance,howaretheyhandledincodeandwhyismultipleinheritanceused
SequentialFileProcessing
Whatisafileandhowisitaccessed?
Storingtextdataonafile:
howisdatastoredandretrieved
Howisnumericdatastoredinatextfile
candatawithinatextfilebemodified?
Howisatextfile"modified"ifdatachanges?
Whymustdelimitersbeused?
Isusingablankasadelimiteralwaysagoodchoice?
Whyisexceptionhandlingespeciallyimportantwhenprocessingfiles?
Howdowecheckforandaddressfileerrorconditions?
Whatkindoferrorconditionsshouldweanticipate?
Howcanfilesbeusedbyclassconstructorsanddestructorstoimplementobjectpersistence?
RandomFileAccess
Howdoesbinarydatadifferfromtextdata
usingstructstocreatefixedlengthrecords
Howistextandnumericdatastoreddifferentlyinrandomfilesthaninsequentialtextfiles?
Considerabusinesscasestudythatimplementsabusinessapplicationusingrandomfileprocessing
input/outputofobjects
Exceptionhandling
whatisexceptionhandlingandwhenshoulditbeused
identifyingexceptionconditions
throwingexceptionsinsteadofdisplayinganerrormessage
handlinganexceptionusingthetryandcatchclauses
rethrowinganexception
usingthelibrar
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- How to Programdoc
![提示](https://static.bdocx.com/images/bang_tan.gif)