摘要:
原则一:(SRP:Single responsibility principle)单一职责原则又称单一功能原则 核心:解耦和增强内聚性(高内聚,低耦合) 描述:类被修改的几率很大,因此应该专注于单一的功能。如果你把多个功能放在同一个类中,功能之间就形成了关联,改变其中一个功能,有可能中止另一个功能, 阅读全文
摘要:
public class tset{ public static void main(String[] args)( System.out.println(helloworld); ) } 阅读全文
摘要:
LiLiSunZhangZhabgSunLiSunZhangLiResult Li:4Zhang:2 Sun:3 Process exited after 47.39 seconds with return value 0请按任意键继续. . . 例9.4 The order is: 10110 S 阅读全文
摘要:
1 # include 2 3 void fun() 4 { 5 int a[10]={0,1,2,3,4,5,6,7,8,9}; //定义10个数组 6 int *p,i; 7 p=&a[i]; //把数组a的地址全部给指针p 8 for(i=0;i<10;i++) ... 阅读全文
摘要:
void swap(int *a,int *b) //定义函数 { int t; //输入一个整型t t=*a; *a=*b; *b=t; //交换 *a,*b } int main() //主函数 { int m,n; //输入整型 m n int *p1,*p2;// 输入两个指针变量 scanf... 阅读全文
摘要:
# include //头文件 void leng(int x[],int n)//定义一个函数 { int i,j,k,t;//定义整形变量 for(i=0;ix[k]) k=j; //将j的值赋给 if(k!=i) { t=x[i];x[i]=x[k];x[k]=t... 阅读全文
摘要:
# include //头文件 void swap(int *a,int *b) //定义函数 { int t; //输入一个整型t t=*a; *a=*b; *b=t; //交换 *a,*b } int main() //主函数 { int m,n; //输入整型 m n int *p1,*p2;... 阅读全文
摘要:
阅读全文