需要本论文完整程序源代码,答辩PPT,开题报告等全套资料,请联系本文档上传者QQ
public class Class {
private String name;//班级名称 private int id;//班级号
private int number;//班级人数 private Sequence cs; public Class(){ }
public Class(int id,String name,int this.name = name; this.number = number; this.id = id; setCs(new Sequence()); }
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public int getNumber() { return number; }
public void setNumber(int number) { this.number = number; }
public int getId() { return id; }
public void setId(int id) {
number){
需要本论文完整程序源代码,答辩PPT,开题报告等全套资料,请联系本文档上传者QQ
this.id = id; }
public Sequence getCs() { return cs; }
public void setCs(Sequence cs) { this.cs = cs; } }
//ClassDemo.java
package com.youngmaster; import java.io.*; import java.util.Date; import java.util.Calendar; import jxl.*; import jxl.write.*; public class ClassDemo {
public void print()throws Exception{
WritableWorkbook book = Workbook.createWorkbook(new File(\
WritableSheet sheet = book.createSheet(\第一页\ Label[] label = new Label[5]; label[0] = new Label(0,0,\星期\ label[1] = new Label(1,0,\日期\ label[2] = new Label(2,0,\剑锋\ label[3] = new Label(3,0,\秋静\ label[4] = new Label(4,0,\秦少游\ for(Label l:label){ sheet.addCell(l); }
需要本论文完整程序源代码,答辩PPT,开题报告等全套资料,请联系本文档上传者QQ
//输出日期
for(int i=1;i<365;i++){
Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE,i-1);
double m = cal.get(Calendar.DAY_OF_WEEK);
jxl.write.Number
number
=
new
sheet.addCell(number); Date date = cal.getTime();
jxl.write.DateTime
dt
sheet.addCell(dt); }
book.write(); book.close(); }
public static void main(String[] args) { ClassDemo cd = new ClassDemo(); try {cd.print(); }
catch(Exception e){ System.out.println(e); } } } //ClassRoom.java
package com.youngmaster; public class ClassRoom {
private String name;//教室名称 private int id;//教室号
private int number;//教室容纳人数
=
new
jxl.write.Number(0,i,m); jxl.write.DateTime(1,i,date);
需要本论文完整程序源代码,答辩PPT,开题报告等全套资料,请联系本文档上传者QQ
public ClassRoom(){ }
public ClassRoom(int id,String name,int number){ this.name = name; this.id = id; this.number = number; }
public String getName() { return name; }
public void setName(String name) this.name = name; }
public int getId() { return id; }
public void setId(int id) { this.id = id; }
public int getNumber() { return number; }
public void setNumber(int number) this.number = number; } }
//Course.java
package com.youngmaster; public class Course {
{ {