Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 1.71 KB

exam.md

File metadata and controls

29 lines (23 loc) · 1.71 KB

what is top-down design in software developmant?

  • rather than solving the problem as a single unit (one large problem), break it into sub-problem and solbe sub-problems. When coding these sub-problems you can employ functions.

variable

Local Variable Glocal Variable Instance Variable - in a class
Definition introduced inside a function introduced outside of any functions in the proram introduced in the constructor of a class
Scopt the funstion it is defined in the entire program the entire class it is defined in
Lifetime until the function it is introduced in comes to an end until the proram comes to an end it can be used as long as the object can be accessed

OOP

encapsulation

  • encapsulation is the mechanism for restricting the access to some of an object components

abstraction

inheritance

  • Methods defined in the superclass can be used in subclasses. Therefore, it is good because:
    • can re-use code
    • can reduce duplicate code
    • save time in programming due o reuseability of code
    • subclasses bcome more manageable

polymorphism

  • A method in a subclass may contain a different set of statements from the method in the superclass
  • The method in the subclass is said to override the method in the superclass