Topics

Important Points

1

Object-Oriented Basics

  1. Every object has both state (data) and behavior (operations on data).

  2. Objects usually match nouns in the description.

2

Naming Convention

Use nouns for classes/variables and verbs for methods/functions.

3

Git Check out

When you check out a commit, Git:

  1. Updates your working directory to match the snapshot in that commit, overwriting current files as needed.

  2. Moves the HEAD ref to that commit, marking it as the current state you’re viewing.

Classic Questions

1

Object-Oriented Property

OO is a higher level mechanism than the procedural paradigm.

This is true.

2

Encapsulation vs. Abstraction

  1. An object is an encapsulation because it packages data and behavior into one bundle.

  2. An object is an abstraction because it lets us think in terms of higher level concepts such as Students rather than student-related functions and data separately.

3

API

An Application Programming Interface (API) specifies the interface through which other programs can interact with a software component. It is a contract between the component and its clients.

For example, a class has an API (e.g., API of the Java String class, API of the Python str class) which is a collection of public methods that you can invoke to make use of the class.


Choose the correct statements.

Last updated