Thisclassisgonnabecalledpersontorepresentanypersonyouwanttorepresent, andit's gonnahavethreeattributesname, whichisgoingtobe a stringpersonality, whichisalsogoingtobe a stringonissitting, whichisgoingtobe a bullion, whichmeansthisisgoingtobeeithertrueorfalseon.
Andthentoshowthateachpersonowns a particularRobertwillneedtoaddanotherattribute.
OfcoursecalledRobertOwnedonthisRobertownedthevalueofthisattributeswillbe a Robertobject.
SothattypeofthisattributeswillneedtobeRobertAndthen, justlikewedidwiththerubberclass, wecancreate a constructorhereaswell.
Thisconstructorisgonnabecalled a personbecauseweneedtocall a constructorthesamenameastheclass.
Sothisispersonwhichtakesthreeargumentsstringanddrinkteaandbullion I andthenoncewecreatethisobjectbyusingthisconstructor, thisthatnamethatnewobjectsnamewillbeandthegivenstring.
Incestvariablewillbethegiven I andlet's justquicklydefinetheothermethodswehadinthisclassaswell.
OneofthemwascalledSitdown.
Thisisjustgoingtosimplysetthisobjectsissittingvaluetootrueandthentheoppositeofsitdown, whichisstandupthatonesetsthisobjectsissittinginstanceviableor a tributetobefalse.
Youjustneedtowrite p onedotrobertownecosare, too, andthissetstheattribute.
TheRobertownattributesoff P 12 are, too.
Andthenwecandothesamethingfor P twoaswell.
IfyouwanttoshowthatthesecondpersonVikiownsthefirstrubit, Tom, youcanjustwrite p tothatRobertOwnEco's areone, andthatway P two's roadownattributeswillbeourone.
So, forexample, whatifyouhadthesefiverobertsoneachofthemcanbeexpressedas a rabbitobjectonwhatifyouwantedtoshowthat, forexample, thesetworobotsarefriendswitheachotherandthesetworobotsarefriendswitheachotherandsewn, oritcouldbesomethinglikethis.
Soifyouwanttojumpaheadandstartlearningtheseconceptsonyourown, youmightwanttotakeoutbrilliantintheircomputersciencealbumscourse, theyhave a sectionaboutgraphs, and I thinkthiswouldbeperfectforsomeonewho's juststartingtolearndatastructuresandalbumslike a setting.
MypreviousvideosSolvingPoemsis a reallygoodwaytosolidifythecomputerscienceknowledgeyou'vegainedpassivelybywatchingvideosorreadingsomething.
I thinkbrilliantcanbe a goodcomplimenttothiscoursebecauseitgivesyou a goodwaytopracticewhatyou'velearnedthroughsolvingpoems.