Oryoucanfollowthelinkthat I haveleftinthedescriptionoffthevideo.
Now, hopefullyyoudownloaded a setoffolderonYouareaseageras I amworkingonthisproject.
Sowheneverwehave a downloadfolderorsetupfullavailable, wecanjustopenitupandwecannoticewhatwehaveregardingtheHTMLInsidiousisnowThere's notgonnabeanyfunctionality.
So I'm justusing a mainstylesonjusttheflyingthemas a classes.
Andthenwealsohavetheaddressnowbecausethisis a biggerproject.
Younoticedthatthere's quite a fewthingsthat I alreadyrightawayatittotheactressandletmegooverthisjusttomakesomeclarifications.
Well, firstthingsfirst.
Priortothisproject, wehavebeensettingup a constructivefunctionthatwasresponsibleforallourinstancesinthiscase, ifwewouldwannahave a constructivefunctionforyou, I wecreated a constructivefunction.
Andthenweaddedallthepropertiesto a presidentandifwehadsomeotherconstructivefunction, andifyouwouldwanttoaddsometimeofpropertiesinthere, weaddedintheparameter.
Andthenwesaiditequaltothis.
Sothissideof D wasequalto i d.
AndherewepassedEddie.
Like I said, thisprojectisgonnabedifferentbecauseweweregonnamakeuseoffthe E s sixandwehavetheclassictext.
Nowtheclasssyntaxiswith a classkeywordfirst, Soweneedtohave a classkeyword.
Youknewyouareclassinstanceandthenwewouldbegettingtheinstanceoffthisclasswheneverwehaveclass, wealsohaveanoptionoffhaving a constructormethodthat's gonnaruneverytimewe'regonna.
Instead, sheatetheclassandwehavetwooptions.
Wecaneitherpasstheparametersagain.
Let's saythatwewouldsay I d.
Soeverytimewewouldbepassingthisideawouldsaythis I d.
Soforeveryinstance, obviously, this I d wouldbedifferent.
So I alreadyknowthat I'm gonnahavepropertyofthisbudgetfeedbackand I'm justgoingtouse a documentcareerselector, and I'm justgonnaset a budgetfeedbackorexpensefeedback.
Andthisiswhat I skipped.
So I skippedalltheseselectionsbecausebynowweforsureshouldhave a goodhandleoffselectingsomething.
So I don't thinkthatweneedtorightthisfor, let's say, 20 minutes.
BecausethisshouldmakeallsensethoseObviously, as I'm working, wewillgonnabeswitchingmyKrishnaMel, maybejusttoshowyouwhereexactly I'm gettingthis.
Butwealreadyshouldhave a goodhandleofthiswherewehavetheform.
Andbasicallywhatwe'regonnadoiswe'regonnasetup a methodsonthisclass, andwe'regonnausethisinstanceandwe'regonnarunthemethodsmostofourworkwe'regonnabedoingintheclass.
Sonow I'm gladtotellyouthatwecanstartworkinginour U Y.
Classoffcreatingthemethods.
Now, thefirstmethodthatwe'regonnabecreatingiswhenwearesubmittingbefore, I wouldwannamakesurethatthevalueisnotzeroorlessthanzero, andifeverythingisfine, I wouldwannashowthebalanceon.
Sonowlet's seethatwehavenovaluesbecauseprobably I misspelleditorsomething.
Sowehavebudget.
Thiswouldbethenameonthiswouldbetheinput.
Sobudgetinputon.
Yeah, sureenough, becausethiswas a classthat I wasselecting.
I'm sorry.
Yeah, Mypropertywaswith a capitalletterbecause I cannotusedashes.
Andthenif I'm lookingforthe i d, then I needtousethedashissoTherefore, ifyou'reconfusedaboutsomethingthatyou'regettingout, youcanusethecommand f ormakesurethatyou'renottypinglikethiswithmyinput, But I waslookingforinsteadoftypewithdashesandeverythingisgonnabefine.
It's not a bigdeal, but I justalwayslikedtoworkwith a bunchoffunctionsintheproject.
Justsoyougettoknowthemondhe, I wouldwanttohideit.
I mean, longstoryshort.
Let's justhidenowhowwe'regonnahidethis.
We'regonnauseagainthesettimeout, andwe'regonnahave a settime.
Now, thisisgonnabe a function.
Now, thisfunctionisgonnarequire a callbackfunctiononthiswouldbethecallbackfunctionpassingin, andthenthesecondparameterisgoingtobeHowlongthishowlongthisfunctionisgoingtorun.
Soagain, let's do 4000 seconds.
Andnowlet's do a this.
Nowweknowthatwehavetheaccessto a budgetFeedthatclasslist.
However, sincewe'rerunningdysfunctionwithinthismethodnow, thisisnotpointinganymorebackto a class.
It's pointingto a globalobject.
Soagain, weneedtodosomethingwith a self.
Oryoucannamethisreallywhateveryouwouldwant.
Sobasicallywhatyouwoulddoyouwouldsay, Const.
Onagain, I'm goingtoyourself.
Butyoucanwritewhateververyblueone, And I'm goingtosetthisequaltothisNamgrabbingthevalueofthisthatisgonnabepointingbacktotheclassandjusttoshowyou, let's do a logon.
Let's dothisfromthiscase.
Letmeshowyou.
Whatisthispointingto?
Now?
Let's alsohave a lookatwhathappenswithinthisfunctionwherethisispointingtojustsoyoudon't thinkthat I'm I don't know, makingthisstuffoff.
Like I said, mostoftheworkisgonnabeinyourclass, so I'm I knowthatmaybethisisgonnabefrustratingforsomebody, butwe I mean, mostoftheworkhereisjustgonnabepassingoneortheothermethod.
Now, inthiscase, I havethatthisandthisisnotinsidesomekindofotherfunctionthatwe'rerunningitsoeverythingisfine.
Theyskiwherenowisgonnabeagain, pointingbackto a classfromnow.
Inthiscase, I canusethisshowbalancedthisnotyourboundsbecause I knowthat I'm gonnabecreatinganothermethodNowthemethodisgonnabewell, surprise, surpriseshowbalance.
Sonow I haveaccesstoit.
Sonowagain, Like I said, wedon't needtouseanykindofahfunction.
Keywordscreencouldjustwrite, showbalanceonfornow.
We'regoingtodoverysimpleagain.
Consullog I'm goingtodoHey, I amreallywhere?
I don't knowwhy I'm doingthis.
Wecanjustdo a Mactickstemplateliberals.
Hey, I'm getting a holdoffthiskeyword.
Well, I meanthiskeyboardyah, Thiskeywordononce I said, I hopewedon't make, like, 10,000 mistakeswiththiskeyword.
Like I saidlateron, oncewe'regonnahavetheactualvalues, wewillgonnamakethisfunctionalitywherethisisgonnamakewaymoresense.
Butfornow, I don't seethepointofgoingthrough.
Ifthereisnovalues, really.
I mean, justkindofdefinitelymakessense.
Solet's havethis.
Andnowweknowthatthisexpenseshouldhave 400 becausewehavetotalexpenseandwerejustreturningdetailsogoodenoughwehave a hardcodedvalueoff 400.
Next, we'regonnabeworkingwith a totalsowe'regonnahaveconst.
I don't know.
Thisisgonnabethevariable.
Nowhere.
I wouldwant a farcein't.
So I'm gonnausethismethodthat I havewithPartsandTurner.
Andthereasonforthatisbecause I wouldwanttograbthevaluethat's gonnabeinthebudgetfromwhatevervaluehasBeanpassedinthebudgetandagainrememberimportantthing.
I'm onlyrunningthisafter I haveaddedalreadyinthebudget.
Youcannotgetsomevaluebackfromthedumbelementifthere's nothingthere, ifyou'rejustrunningthisfunctionrightawayasthedocumentcontentloadssoweneed a parseintegerNow, hereagain, we'regoingtousethepropertieswehaveandwillhave a budgetamounttextcontent.