Hands-on practice for this lecture. Work through the exercises and quizzes to reinforce what you've learned.
Exercise 1 of 1
Balance code reuse and enforcement. Decide which methods in a "Shape" class should have logic and which should be left for children to implement.
calculateArea()printInfo()move(x, y)draw()Decide if each behavior in the Shape blueprint should be Abstract or Concrete.
ðŸ—ï¸ Abstract Classes allow you to provide partial functionality (Concrete) while enforcing rules for specialized behavior (Abstract).
Practical exercises to master the concepts.
Create an abstract Database class with a concrete connect() method and an abstract query(sql: string) method.