03 2017 档案

学记
摘要:学记 《学记》,是古代中国典章制度专著《礼记》(《小戴礼记》)中的一篇,写作于战国晚期。相传为西汉戴圣编撰。据郭沫若考证,作者为孟子的学生乐正克。《学记》文字言简意赅,喻辞生动,系统而全面地阐明了教育的目的及作用,教育和教学的制度、原则和方法,教师的地位和作用,教育过程中的师生关系以及同学之间的关系 阅读全文

posted @ 2017-03-30 22:32 tuzhuo 编辑

36.java_exception_test
摘要:package mytext1; class TZException extends Exception{ TZException(String str){ super(str); } public String toString(String msg){ String tempt="the act 阅读全文

posted @ 2017-03-30 17:06 tuzhuo 阅读(105) 评论(0) 推荐(0) 编辑

c++中enum的用法——枚举类型
摘要:将变量的可取值全部列举出来,写在程序的开头,使用该类型的时候显示地指定取值即可(即对枚举变量进行赋予元素操作,这里之所以叫赋元素操作不叫赋值操作就是为了说明枚举变量是不能直接赋予算数值的)。 如: enum egg {a,b,c}; enum egg test; //在这里可以简写egg test; 阅读全文

posted @ 2017-03-29 17:08 tuzhuo 阅读(764) 评论(0) 推荐(0) 编辑

35
摘要:#include <iostream>using namespace std; class Base1 { //基类Base1定义public: void display() const { cout << "Base1::display()" << endl; }}; class Base2: p 阅读全文

posted @ 2017-03-29 16:22 tuzhuo 阅读(87) 评论(0) 推荐(0) 编辑

34
摘要:#include <iostream>using namespace std; class Point { //Point类定义public: //外部接口 Point(int x = 0, int y = 0) : x(x), y(y) { //构造函数 //在构造函数中对count累加,所有对象 阅读全文

posted @ 2017-03-29 16:20 tuzhuo 阅读(153) 评论(0) 推荐(0) 编辑

33
摘要:#include <string>#include <iostream>using namespace std; class ExamInfo {public: //三种构造函数,分别用等级、是否通过和百分来初始化 ExamInfo(string name, char grade) : name(n 阅读全文

posted @ 2017-03-29 16:18 tuzhuo 阅读(95) 评论(0) 推荐(0) 编辑

32
摘要:#include <iostream>#include <cmath>using namespace std; class SavingsAccount {private: int id; double balance; double rate; int lastDate; double accum 阅读全文

posted @ 2017-03-29 16:17 tuzhuo 阅读(106) 评论(0) 推荐(0) 编辑

31
摘要:#include <iostream>using namespace std; class Clock {public: void setTime(int newH = 0, int newM = 0, int newS = 0); void showTime();private: int hour 阅读全文

posted @ 2017-03-29 16:16 tuzhuo 阅读(126) 评论(0) 推荐(0) 编辑

30
摘要:#include <iostream>using namespace std; struct Aircraft { int wingspan; int passengers; union { float fuelLoad; float bombLoad; int pallets; };} fight 阅读全文

posted @ 2017-03-29 16:15 tuzhuo 阅读(71) 评论(0) 推荐(0) 编辑

28
摘要:#include <iostream> using namespace std; typedef struct mytype{ int a; float b;}; int main(int argc, char *argv[]){ mytype obj; obj.a=6; obj.b=1.4;ex 阅读全文

posted @ 2017-03-29 16:14 tuzhuo 阅读(75) 评论(0) 推荐(0) 编辑

29
摘要:#include <iostream>#include <cstring> using namespace std; struct books{ char name[50]; char author[50];}; void printBook( struct books *book ) { cout 阅读全文

posted @ 2017-03-29 16:14 tuzhuo 阅读(58) 评论(0) 推荐(0) 编辑

【转载】关于c++中的explicit
摘要:按照默认规定,只有一个参数的构造函数也定义了一个隐式转换,将该构造函数对应数据类型的数据转换为该类对象,如下面所示: class String { String ( const char* p ); // 用C风格的字符串p作为初始化值 //… } String s1 = “hello”; //OK 阅读全文

posted @ 2017-03-24 15:51 tuzhuo 阅读(122) 评论(0) 推荐(0) 编辑

ubuntu中文字符集格式转换
摘要:TZ 于 华中农业大学逸夫楼 阅读全文

posted @ 2017-03-24 15:13 tuzhuo 阅读(107) 评论(0) 推荐(0) 编辑

QQ_SingleTalkClient
摘要:package test_teacher;import java.io.*;import java.net.*;public class SingleTalkClient{ public static void main(String[] args) throws IOException { Soc 阅读全文

posted @ 2017-03-22 18:56 tuzhuo 阅读(139) 评论(0) 推荐(0) 编辑

QQ_MultiTalkServer
摘要:package test_teacher;import java.net.*;import java.io.*;public class MultiTalkServer{ public static void main(String[] args) throws IOException { Serv 阅读全文

posted @ 2017-03-22 18:55 tuzhuo 阅读(180) 评论(0) 推荐(0) 编辑

24(java_io from keyboard)
摘要:public class ReadFromKB{ public static void main(String args[]) { try { byte bArray[]=new byte[128]; String str; System.out.println("Enter something U 阅读全文

posted @ 2017-03-19 10:33 tuzhuo 阅读(97) 评论(0) 推荐(0) 编辑

23(java/io/data_io)
摘要:package test_ppt;import java.io.*;public class test_ppt{ public static void main(String args[]) throws IOException { FileOutputStream fos = new FileOu 阅读全文

posted @ 2017-03-19 10:16 tuzhuo 阅读(101) 评论(0) 推荐(0) 编辑

22
摘要:package test3; import java.io.*;public class test3{ public static void main(String args[]) { try { System.out.print("Input: "); int count,n=512; byte 阅读全文

posted @ 2017-03-19 09:18 tuzhuo 阅读(92) 评论(0) 推荐(0) 编辑

21
摘要:package freshman; import java.awt.*;import javax.swing.*; public class LottoMadness extends JFrame { // set up row 1 JPanel row1 = new JPanel(); Butto 阅读全文

posted @ 2017-03-11 21:47 tuzhuo 阅读(87) 评论(0) 推荐(0) 编辑

20
摘要:package room1; import java.time.*;import java.time.temporal.*; class Clock { public static void main(String[] arguments) { // get current time and dat 阅读全文

posted @ 2017-03-11 21:46 tuzhuo 阅读(92) 评论(0) 推荐(0) 编辑

18
摘要:package room1;class Employee{ String name; int age; String designation; double salary; // This is the constructor of the class Employee public Employe 阅读全文

posted @ 2017-03-11 21:45 tuzhuo 阅读(63) 评论(0) 推荐(0) 编辑

19
摘要:package room1; class circle{ public static double pi=3.1415926535; float radius; float x,y; circle(float r,float x,float y){ radius=r; this.x=x; this. 阅读全文

posted @ 2017-03-11 21:45 tuzhuo 阅读(81) 评论(0) 推荐(0) 编辑

16
摘要:package arraylistlearning; import java.awt.*; public class Point3D extends Point { public int z; public Point3D(int x, int y, int z) { super(x,y); thi 阅读全文

posted @ 2017-03-11 21:44 tuzhuo 阅读(74) 评论(0) 推荐(0) 编辑

17
摘要:package arraylistlearning;public class MyPoint4D extends Point3D{ public int t; public MyPoint4D(int x, int y, int z,int t) { super(x, y, z); if(t<0) 阅读全文

posted @ 2017-03-11 21:44 tuzhuo 阅读(70) 评论(0) 推荐(0) 编辑

15
摘要:package arraylistlearning; public class Point4DTester { public static void main(String[] arguments) { MyPoint4D object1 = new MyPoint4D(10,22,71,26); 阅读全文

posted @ 2017-03-11 21:43 tuzhuo 阅读(84) 评论(0) 推荐(0) 编辑

12
摘要:package arraylistlearning; import java.util.*; public class StringLister { String[] namesy = { "Spanky", "Alfalfa", "Buckwheat", "Daria","Stymie", "Ma 阅读全文

posted @ 2017-03-11 21:42 tuzhuo 阅读(88) 评论(0) 推荐(0) 编辑

13
摘要:package arraylistlearning; import java.util.*; public class StringLister { String[] namesy = { "Spanky", "Alfalfa", "Buckwheat", "Daria","Stymie", "Ma 阅读全文

posted @ 2017-03-11 21:42 tuzhuo 阅读(75) 评论(0) 推荐(0) 编辑

14
摘要:package arraylistlearning; import java.awt.*; public class PointTester { public static void main(String[] arguments) { Point location1 = new Point(11, 阅读全文

posted @ 2017-03-11 21:42 tuzhuo 阅读(66) 评论(0) 推荐(0) 编辑

11
摘要:package test; import java.awt.*;import java.applet.*;abstract class Shapes { protected int x,y,k; protected double m; public Shapes(int x,int y,int k, 阅读全文

posted @ 2017-03-11 21:40 tuzhuo 阅读(93) 评论(0) 推荐(0) 编辑

10
摘要:package test; import java.applet.*;import java.awt.*;import java.awt.event.*; public class file6_11 extends Applet implements KeyListener { private Te 阅读全文

posted @ 2017-03-11 21:39 tuzhuo 阅读(95) 评论(0) 推荐(0) 编辑

8
摘要:package test; class FighterPlane{ private String name; private int missileNum; private A a; public FighterPlane(String _name,int _missileNum){ name = 阅读全文

posted @ 2017-03-11 21:38 tuzhuo 阅读(88) 评论(0) 推荐(0) 编辑

9
摘要:package test; class AddClass{ public int x=0,y=0,z=0; AddClass (int x) { this.x=x; } AddClass (int x,int y) { this(x); this.y=y; } //调用第一个构造方法 AddClas 阅读全文

posted @ 2017-03-11 21:38 tuzhuo 阅读(76) 评论(0) 推荐(0) 编辑

7
摘要:package chapter12;import java.awt.*;import java.awt.event.*; public class test_19{ public static void main(String arg[]) { Frame f = new Frame("Graphi 阅读全文

posted @ 2017-03-11 21:37 tuzhuo 阅读(84) 评论(0) 推荐(0) 编辑

6
摘要:package test1; class teacher1{ public teacher1(){ System.out.println("builder"); } public void function(double a){ System.out.println("double"); } pub 阅读全文

posted @ 2017-03-11 21:36 tuzhuo 阅读(81) 评论(0) 推荐(0) 编辑

4
摘要:#include <iostream> namespace first{ int a=10; int b=20; namespace second { double a=1.02; double b=5.002; void hello(); } void second::hello() { std: 阅读全文

posted @ 2017-03-11 21:33 tuzhuo 阅读(92) 评论(0) 推荐(0) 编辑

5
摘要:package test2; class A{ int x=4;int y=1; public void Printme() { System.out.println("x="+x+" y="+y); System.out.println("class name: "+getClass().getN 阅读全文

posted @ 2017-03-11 21:33 tuzhuo 阅读(104) 评论(0) 推荐(0) 编辑

3
摘要:#include <windows.h> const char g_szClassName[] = "myWindowClass"; // Step 4: the Window ProcedureLRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM 阅读全文

posted @ 2017-03-11 21:29 tuzhuo 阅读(147) 评论(0) 推荐(0) 编辑

2
摘要:#include <windows.h> const char g_szClassName[] = "myWindowClass";/*窗口过程在每个消息到来时被调用一次,HWND参数是消息相应的窗口的句柄.这很重要因为你可能用相同的类创建了两个或多个窗口并且它们用相同的窗口过程(WndProc() 阅读全文

posted @ 2017-03-11 21:28 tuzhuo 阅读(131) 评论(0) 推荐(0) 编辑

关于C++中的前置声明(附程序运行图)
摘要:TZ实验于华中农业大学逸夫楼2017.3.10 在编写C++程序的时候,偶尔需要用到前置声明(Forward declaration)。下面的程序中,带注释的那行就是类B的前置说明。这是必须的,因为类A中用到了类B,而类B的声明出现在类A的后面。如果没有类B的前置说明,下面的程序将不同通过编译,编译 阅读全文

posted @ 2017-03-10 15:15 tuzhuo 阅读(396) 评论(0) 推荐(0) 编辑

c++中的namespace(附程序运行图)
摘要:TZ实验于华中农业大学逸夫楼2017.3.10 namespace中文意思是命名空间或者叫名字空间,传统的C++只有一个全局的namespace,但是由于现在的程序的规模越来越大,程序的分工越 来越细,全局作用域变得越来越拥挤,每个人都可能使用相同的名字来实现不同的库,于是程序员在合并程序的时候就会 阅读全文

posted @ 2017-03-10 14:51 tuzhuo 阅读(306) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示