Fish to be a skilled programmer—second day
来源:互联网 发布:传奇3装备数据库 编辑:程序博客网 时间:2024/05/23 23:18
Since graduated from university,life was barely fulfilling like this week. The excellent learning-habits destroyed completely in the past years now were reconstructed little by little, the consequent confidences give me plenty of power and courage. Nothing could stop you moving forward, so do not hesitate, do not look back, just fight!
Summary of the first day :
1、what are software and program?
2、computer language:machine language>assembly language>high-level language.
3、the features of high-level language:compile and explain.
4、the steps of programming:analyse problem>determine the data structure and algorithm>programming>debugging problems.
5、algorithmic notations: pseudocode and flow diagram.
6、structure:sequence structure,select branch structure and cycle structure.
7、the common mistakes of coding: grammatical error,logic error,run-time error.
8、the origin and development of Java.
9、how to install jdk for pc.
/*
作者:刘建发
日期:2016.09.29
功能:this的必要性
*/
public class Demo8
{
public static void main(String []args)
{
/* Dog dog1=new Dog(2,"大黄");
Person p1=new Person(dog1,23,"郭德纲");
Person p2=new Person(dog1,24,"刘谦");
p1.showInfo();
p1.dog.showInfo();*/
int total=0;
Child ch1=new Child(3,"妞妞");
ch1.joinGame();
Child ch2=new Child(4,"小小");
ch2.joinGame();
Child ch3=new Child(5,"大大");
ch3.joinGame();
System.out.println("共有="+ch3.total);
}
}
//定义小孩类
class Child
{
int age;
String name;
//total是静态变量,因此他可以被任何一个对象访问
static int total=0;
public Child(int age,String name)
{
this.age=age;
this.name=name;
}
public void joinGame()
{
total++;
System.out.println("有一个小孩加入了");
}
}
//定义一个人类
class Person
{
//成员变量
int age;
String name;
Dog dog;
public Person(Dog dog,int age,String name)
{
//可读性不好
this.dog=dog;
this.age=age;
this.name=name;
}
//显示人名字
public void showInfo()
{
System.out.println("人名是:"+name);
}
}
class Dog
{
int age;
String name;
public Dog(int age,String name)
{
this.age=age;
this.name=name;
}
//显示狗名
public void showInfo()
{
System.out.println("狗名叫"+this.name);
}
}
- Fish to be a skilled programmer—second day
- Fish to be a skilled programmer—third day
- Fish to be a skilled programmer—forth day
- To be a programmer
- To be a good programmer
- To be a great programmer
- to be A Coder,OR A Programmer
- to be a Programmer or a Architect?
- Beyond Programmer : To Be a Software Engineer
- You want to be a Graphics Programmer ...
- How to be a top 5% programmer
- How to be a good programmer
- How to be a programmer中文版
- 程序员笔记 To Be A Programmer
- To be a Literature and Art Programmer
- To be a programmer with good habit rather than to be a good programmer!
- Take a lifetime to be a good (and happy) programmer
- a day of a programmer
- android intent传递对象和集合
- Spring Session + Redis实现分布式Session共享
- Leetcode-Nim Game
- 分析wda-lucene
- .htaccess文件验证
- Fish to be a skilled programmer—second day
- 一个什么都不懂的程序员的服务器折腾日志
- iOS开发tableview为什么没有调用heightForRowAtIndexPath方法
- 重新建立wordpress个人博客之旅
- 网狐6603开发闲来麻将房卡源码(手机端+服务器+数据库)全套源码下载
- Velocity 使用笔记
- cf615Multipliers+N的约数的乘积
- 我的第一篇博客
- 面试题目:2个鸡蛋100层楼问题