通常it manage問咩係oop 應該點答
寫code就好d,背書真係唔識答,google左都係唔知點up出黎
如果俾我我會咁答 Build logic that focus on modifying object attributes, 然後解釋polymorphism ,再解釋inheritance
然後睇份工用咩language, 舉個例講返oop會點做
呢類interview會講到口乾
上次俾人問abstract class同interface 既分別我都答唔到concept野(Multiple Inheritance,When to use )
識做唔一定識解釋
真係明既話OOP Language冇乜邊隻你會學唔識,都係syntax上有大分別,同一個logic寫 d code唔會太爛
encapsulation緊要過polymorphism, 因為encapsulate先係你要自己做既野,
polymorphism好多時你都只係用已有既野, 即係list同map咁
abstract class同interface照字面意思就係class係一個大類,
底下所有野都有呢d property, interface就無話咩object,
只要件野有果樣property, 你就可以implement個interface,
可以話係人地d parameter想接受一個類別既野, 又或者接收有某d property既野,
咁既分別, sorly for 1999
有d無interface既language可能用abstract class扮interface,
又或者連abstract class都無既language要用class黎扮, 裡面throw哂exception
要知自己點解咁做, 雖然寫係咁寫但實際唔係呢個意思
呢d位就要靠naming convention同自律唔好abuse佢
multiple inheritance通常都叫你唔好用, 除非係implement interface,
真係要用你要知道隻language點resolve conflict, 簡直係無野搵野黎搞
比我大約會咁答