10-0. Compile, execute, and test the programs in this chapter.
10-1. Rewrite the student-grading program from §9.6/166 to generate letter grades.
10-2. Rewrite the median function from §8.1.1/140 so...
分类:
编程语言 时间:
2014-10-26 22:59:49
阅读次数:
390
一、结构体的定义
1、定义形式
struct 结构名
{成员列表;}; //定义为语句,分号不能丢
2、结构类型变量的声明
(1)声明形式1
struct student
{
int number;
char name[10];
float score;
};
struct student st...
分类:
编程语言 时间:
2014-10-26 22:53:30
阅读次数:
220
表结构:
实体类图:
CRUD:
Student:
package com.demo.model;
import java.io.UnsupportedEncodingException;
import java.util.Set;
/**学生信息
* @author wobendiankun
*2014-...
分类:
Web程序 时间:
2014-10-26 21:17:39
阅读次数:
322
学生表:Student 学生表 (学号,姓名,性别,年龄,组织部门) Course课程表 (编号,课程名称) Sc选课表 (学号,课程编号,成绩)表结构如下:(1).写一个SQL语句,查询选修了’计算机原理’的学生学号和姓名(2).写一个SQL语句,查询’周星驰’同学选修了的课程名字(3).写一个S...
分类:
数据库 时间:
2014-10-25 18:32:41
阅读次数:
245
9-0. Compile, execute, and test the programs in this chapter.
9-1. Reimplement the Student_info class so that it calculates the final
grade when reading the student's record, and stores that grade i...
分类:
编程语言 时间:
2014-10-25 13:16:07
阅读次数:
239
当我们创建对象时,一般有2种写法。1.字面量直接写 2.通过构造函数进行声明字面量:var student={ name:"tom", age:16, study:function(){ alert("study"); }}构造函数function Student(name,age...
分类:
其他好文 时间:
2014-10-25 11:51:24
阅读次数:
156
延迟加载:
只有当使用以实体对象的属性(除主键属性外)时,才会发送查询语句到数据库
get不支持延迟加载
@Test
public void getTest(){
Session session=null;
Student student=null;
try{
session=HibernateUtil.openSession();...
分类:
Web程序 时间:
2014-10-24 23:41:23
阅读次数:
392
一. 里氏替换原则:LSP定义:子类可以替换父类的位置,并且程序的功能不受影响(父类变量指向子类对象)。因为父类有的功能子类都有,所以不影响程序的功能。程序示例:1 Person p = new Person();2 p.SayHi();//调用父类的3 Student s = new Studen...
分类:
Web程序 时间:
2014-10-23 20:29:05
阅读次数:
244
结构体:就是一个自定义的集合,里面可以放各种类型的元素,用法大体跟集合一样。一、定义的方法:struct student{public int nianling;public int fenshu;public string name;public string sex;public int sum...
分类:
其他好文 时间:
2014-10-23 19:14:54
阅读次数:
242
主键约束;外键约束;唯一性约束;检查约束;默认值约束 -——————五大约束一、 主键约束;--创建表的主键约束 create table student (student_id number primary key,student_name varchar2(20),sudent_birthday...
分类:
数据库 时间:
2014-10-23 15:48:28
阅读次数:
291