Description
Student类含有私有数据成员:num,name,sex,公有成员函数: 输入函数get_value()和输出函数display()。采用私有保护方式实现类Student1,增加数据成员:age,addr,成员函数:get_value_1()和display_1()。在程序运行时输入num,name,sex,age,addr的值,调用输出函数输出以上5个数据的值。...
分类:
编程语言 时间:
2015-07-04 09:46:48
阅读次数:
141
USE WFC_DBGOcreate table Students(Id int primary key IDENTITY(1,1) not null,Name varchar(255),Age int,Score int)GOinsert into Students values('cheng',...
分类:
Web程序 时间:
2015-07-03 18:48:11
阅读次数:
111
例如: 有以下2个类public class Father { public int age = 70; public static string name = "父亲"; ...
分类:
其他好文 时间:
2015-07-03 12:06:09
阅读次数:
116
/*********************************************************
Swift 字典
*********************************************************/var dictionary = ["name":"LJF","age":"100"]
println(di...
分类:
编程语言 时间:
2015-07-03 10:35:35
阅读次数:
130
先定义一个Student类: 1 @interface Student : NSObject{ 2 int _age; 3 } 4 -(void)setAge:(int)newAge; 5 -(int)age; 6 @end 7 8 //实现 9 @implementation Stude...
分类:
其他好文 时间:
2015-07-03 00:04:02
阅读次数:
131
#coding=utf-8#!/usr/bin/pythonimport json;dict = {};dict['name'] = 'nick';dict['say'] = 'hello world...';dict['age'] = '20';dict_json = repr(dict);pri...
分类:
编程语言 时间:
2015-07-02 23:53:23
阅读次数:
238
导入导出use hndb;db.s.save({name:'李四',age:18,score:80,address:'郑州'});db.s.save({name:'李三',age:8,score:50,address:'郑州'});db.s.save({name:'张三',age:38,score:...
分类:
数据库 时间:
2015-07-02 13:52:53
阅读次数:
240
parse用于从一个字符串中解析出json对象,如 var str = ‘{"name":"huangxiaojian","age":"23"}‘ 结果: JSON.parse(str) Object age:?"23" name:?"huangxiaojian" __proto__:?Object 注意:单引号写在{}外,每个...
分类:
Web程序 时间:
2015-07-02 12:28:05
阅读次数:
143
数据的保存include_once 'mDB.class.php';$m=new mDB();$m->setDB('mydb');// $m->save('stu',['dept'=>'财务','name'=>'张三','age'=>73]);// $m->save('stu',['dept'=>'...
分类:
数据库 时间:
2015-07-02 06:34:19
阅读次数:
234
必备参数:必备参数须以正确的顺序传入函数。 命名参数:命名参数和函数调用关系紧密,调用方用参数的命名确定传入的参数值。 lg: def printinfo( name, age ): "打印任何传入的字符串" print "Name: ", name; print "Age ", ag...
分类:
其他好文 时间:
2015-07-01 21:57:16
阅读次数:
93