面向对象编程与面向过程编程有什么区别?
面向过程的编程应该关注的是如何使用函数去实现既定的功能。
面向对象的编程,是关注如何把相关的功能,包括函数和数据有组织地捆绑到一个对象身上。
过程:
main(string[] args)
{
Console。 Write("hello world!");
}
对象:
public class Class1
{
static public main(string[] args)
{
Console。 Write("hello world!");
}
}
。全部
面向过程的编程应该关注的是如何使用函数去实现既定的功能。
面向对象的编程,是关注如何把相关的功能,包括函数和数据有组织地捆绑到一个对象身上。
过程:
main(string[] args)
{
Console。
Write("hello world!");
}
对象:
public class Class1
{
static public main(string[] args)
{
Console。
Write("hello world!");
}
}
。收起