Object based txhais li cas?
Object based txhais li cas?

Video: Object based txhais li cas?

Video: Object based txhais li cas?
Video: Nqaij Laim Txhais Tau Li Cas 2024, Kaum ib hlis
Anonim

Lub sij hawm " khoom - raws hom lus" tuaj yeem siv rau hauv kev nkag siab zoo los piav qhia txog cov lus programming uas siv lub tswv yim ntawm encapsulating lub xeev thiab kev ua haujlwm hauv " khoom ". Cov lus no txhua tus txhawb lub ntsiab lus ntawm ib qho khoom raws li cov ntaub ntawv qauv, tab sis tsis muaj polymorphism thiab cov cuab yeej cuab tam.

Tom qab ntawd, ib tug kuj yuav nug, koj txhais li cas los ntawm cov khoom raws li qhov system?

Yam khoom - taw qhia hais txog ib hom lus programming, qhov system los yog software methodology uas yog tsim los ntawm cov ntsiab lus ntawm kev xav khoom . Nws ua haujlwm los ntawm kev tsim, kev siv thiab kev siv rov siv dua khoom ua ib txoj hauj lwm, txheej txheem los yog lub hom phiaj.

Qhov thib ob, koj txhais li cas los ntawm cov khoom? Hauv khoom -oriented programming (OOP), khoom yog cov khoom koj xav txog thawj indesigning ib qhov kev pab cuam thiab lawv kuj yog cov units ntawm code uas yog nws thiaj li muab tau los ntawm tus txheej txheem. Txhua khoom yog ib qho piv txwv ntawm cov chav kawm tshwj xeeb lossis subclass nrog cov chav kawm tus kheej txoj kev lossis cov txheej txheem thiab cov ntaub ntawv sib txawv.

Tib neeg kuj nug, qhov txawv ntawm cov khoom taw qhia thiab cov khoom raws li qhov txawv?

Yam khoom raws li lus txhawb kev siv ntawm khoom thiab encapsulation. Lawv tsis txhawb tus qub txeeg qub teg, polymorphism lossis, ob qho tib si. Yam khoom raws li cov lus tsis txhawb nqa built-in khoom . Javascript, VB yog cov piv txwv ntawm khoom cov lus hauv paus.

Yam khoom ntawm chav kawm yog dab tsi?

Yam khoom -Oriented Terminology ib chav kawm piav qhia txog cov ntsiab lus ntawm khoom uas zwm rau nws: nws piav qhia txog kev sib sau ntawm cov ntaub ntawv (hu ua piv txwv hloov pauv), thiab txhais cov haujlwm (hu ua txoj hauv kev). khoom :ib khoom yog ib feem (orinstance) ntawm a chav kawm ; khoom muaj tus cwj pwm ntawm lawv chav kawm.

Pom zoo: