摘要: 原则一:(SRP:Single responsibility principle)单一职责原则又称单一功能原则 核心:解耦和增强内聚性(高内聚,低耦合) 描述:类被修改的几率很大,因此应该专注于单一的功能。如果你把多个功能放在同一个类中,功能之间就形成了关联,改变其中一个功能,有可能中止另一个功能, 阅读全文
posted @ 2019-03-08 11:02 如果······ 阅读(428) 评论(0) 推荐(0) 编辑
摘要: public class tset{ public static void main(String[] args)( System.out.println(helloworld); ) } 阅读全文
posted @ 2019-02-15 13:13 如果······ 阅读(1257) 评论(0) 推荐(0) 编辑
摘要: LiLiSunZhangZhabgSunLiSunZhangLiResult Li:4Zhang:2 Sun:3 Process exited after 47.39 seconds with return value 0请按任意键继续. . . 例9.4 The order is: 10110 S 阅读全文
posted @ 2017-04-11 17:34 如果······ 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 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++) ... 阅读全文
posted @ 2017-04-04 22:33 如果······ 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2017-03-22 21:12 如果······ 阅读(2105) 评论(1) 推荐(0) 编辑
摘要: # 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... 阅读全文
posted @ 2017-03-22 20:53 如果······ 阅读(126) 评论(0) 推荐(0) 编辑
摘要: # 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;... 阅读全文
posted @ 2017-03-22 20:38 如果······ 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-03-22 20:36 如果······ 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 1:指针之间的转换不明白,看不懂是什么意思。 2忘记写分号,中英文写错,把一句重写。 3:多敲键盘,多做练习题,多看书。 阅读全文
posted @ 2017-03-19 12:00 如果······ 阅读(118) 评论(0) 推荐(0) 编辑
摘要: # include <stdio.h> //头文件 void leng(int x[],int n)//定义一个函数 { int i,j,k,t;//定义整形变量 for(i=0;i<n-1;i++) { k=i; for(j=i+1;j<n;j++)//for循环 if(x[j]>x[k]) k= 阅读全文
posted @ 2017-03-19 11:55 如果······ 阅读(151) 评论(0) 推荐(0) 编辑