1. Process oriented
int a = 10;
int b = 5;
int c = a+b;
int r1 = 10;
int r2 = 5;
Double C = r1*r1*3.14-r2*r2*3.14
Cons: Poor reusability, poor scalability, poor maintainability
2. Object-oriented
(1) Object: Everything is Object, object is a class instantiation of things
(2) Class: Something abstracted from a multitude of objects
Cases:
Procedures for managing student information
The main subjects of the study were students
Class of class students in the program (Student name Gender age address contact information)
Student (Code,name,sex,age,address,lianxi)
(3) class Student//define classes followed by class name
{
string Code; Member Variable Code
String name; Member Variable name
BOOL sex; member Variables Sex
int age; Member Variable Age
string address; Member Variable address
String Lianxi; Member Variable Lianxi
}
Created objects
Student s = new Student (); Keyword new, the type of the object is the name of the class
SQL Object-oriented