Classes

Classes are reusable code structures that define objects’ properties and behaviours. The properties represent an object’s state, while the behaviours explain its actions and functions. Classes are characterised by encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation means keeping everything related to an object inside. For example, if there is a product class, the “name” and “price” are related to the product class.
Inheritance is another idea that doesn’t let the rewriting of a code. Simply, a code might be borrowed from other classes. Hence, for a “book” class, “name” and “price” are also applicable.
Polymorphism applies the same behaviour to different classes of products. Even though the products are different, they are treated the same. For example, books and electronics can be treated equally.
Abstraction is focusing on what’s important and what to hide. For example, a user class might handle user login without knowing all the details. Some of the common classes can be understood as follows:-
HTML/ CSS Classes, where HTML can be used to group elements with different features, while CSS can apply styling rules to those elements.
Database Classes represent database tables and perform CRUD( Create, Read, Update, Delete) operations.
Testing Classes organise the test cases into test suites. Thereby, it ensures the quality of a webpage.