C++ - OOP, definitive guide

所在平台: Udemy

课程主页: https://www.udemy.com/course/c-oop-definitive-guide/

课程评论:没有评论

第一个写评论        关注课程

课程简介

**课程名称:C++ - 面向对象程序设计,权威指南** **课程概述:** 本课程将深入探讨面向对象程序设计(OOP)的核心理念,并以C++语言为载体进行实践。OOP旨在将现实世界中的实体概念(如继承、封装、多态)引入编程。其核心目标是将数据与其操作函数紧密绑定,从而限制外部代码对数据的直接访问,增强代码的安全性与模块化。 **核心概念:** * **类(Class)**:类是C++实现面向对象编程的基石。它是一种用户自定义的数据类型,能够封装数据成员(变量)和成员函数(操作数据的方法)。通过创建类的实例(对象),可以运用这些数据和函数。类可以被视为对象的“蓝图”。 * **举例**:以“汽车”类为例。尽管不同汽车品牌和型号各异,但它们通常具有共同属性,如“四个轮子”、“速度限制”、“里程范围”等。“汽车”即为类,“轮子”、“速度限制”、“里程”则为其属性。 * **定义**:类是用户定义的、包含数据成员(数据变量)和成员函数(用于操作数据成员的函数)的用户自定义数据类型。数据成员定义了对象的属性,成员函数则定义了对象的行为。 * **汽车类举例**:数据成员可以是“速度限制”、“里程”;成员函数可以是“刹车”、“加速”等。 * **对象(Object)**:对象是类的实例化。它是根据类的蓝图创建的具体实体,拥有类定义的属性和行为。 **课程目标:** 本课程旨在帮助学习者快速掌握C++中面向对象程序设计的精髓,理解并灵活运用类的概念来构建更强大、更易于维护的程序。

课程评论(0条)

课程详情

Welcome,Object-oriented programming - As the name suggests uses objects in programming. Object-oriented programming aims to implement real-world entities like inheritance, hiding, polymorphism, etc in programming. The main aim of OOP is to bind together the data and the functions that operate on them so that no other part of the code can access this data except that function.Class: The building block of C++ that leads to Object-Oriented programming is a Class. It is a user-defined data type, which holds its own data members and member functions, which can be accessed and used by creating an instance of that class. A class is like a blueprint for an object.For Example: Consider the Class of Cars. There may be many cars with different names and brand but all of them will share some common properties like all of them will have 4 wheels, Speed Limit, Mileage range etc. So here, Car is the class and wheels, speed limits, mileage are their properties.A Class is a user-defined data-type which has data members and member functions.Data members are the data variables and member functions are the functions used to manipulate these variables and together these data members and member functions define the properties and behaviour of the objects in a Class.In the above example of class Car, the data member will be speed limit, mileage etc and member functions can apply brakes, increase speed etc.We can say that a Class in C++ is a blue-print representing a group of objects which shares some common properties and behaviours.This class is intended to teach you how to pick up speed in OOP with C++.

课程标签

0人关注该课程

主题相关的课程