资源简介
简单的使用SQL语句实现管理,为初学者能熟练掌握SQL语句用法

代码片段和文件信息
import java.util.Scanner;
class User {
private String uname;
private String upass;
public String getUname() {
return uname;
}
public String getUpass() {
return upass;
}
public User(String uname String upass) {
this.uname = uname;
this.upass = upass;
}
}
class Student {
private String sname;
private String sid;
private int yscore;
private int escore;
private int mscore;
public void setSname(String sname) {
this.sname = sname;
}
public void setSid(String sid) {
this.sid = sid;
}
public void setYscore(int yscore) {
this.yscore = yscore;
}
public void setEscore(int escore) {
this.escore = escore;
}
public void setMscore(int mscore) {
this.mscore = mscore;
}
public String getSname() {
return sname;
}
public String getSid() {
return sid;
}
public int getYscore() {
return yscore;
}
public int getEscore() {
return escore;
}
public int getMscore() {
return mscore;
}
public Student() {};
public Student(String sname String sid int yscore int escore int mscore) {
this.sname = sname;
this.sid = sid;
this.yscore = yscore;
this.escore = escore;
this.mscore = mscore;
}
}
public class StuDemo {
static User[] users = new User[10];
static Student[] students = new Student[20];
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
String uname = ““;
String upass = ““;
String upass2 = ““;
String sname = ““;
String sid = ““;
int yscore = 0;
int escore = 0;
int mscore = 0;
int sel = -1;
String temp = ““;
flag1:while (true) {
System.out.println(“****学生管理系统****“);
System.out.println(“1.登录“);
System.out.println(“2.注册“);
System.out.println(“3.退出“);
switch ((sel = sc.nextInt())) {
case 1: { //登录
sc.nextLine();
System.out.println(“******用户登录******“);
System.out.println(“请输入用户名:“);
uname = sc.nextLine();
System.out.println(“请输入密码:“);
upass = sc.nextLine();
int y = 0;
for (; y < users.length; y++) {
if (users[y] != null) {
if (uname.equals(users[y].getUname()) &&
upass.equals(users[y].getUpass())) {
break;
}
}
}
if (y == users.length) {
System.out.println(“用户名密码错误!“);
continue flag1;
} else {
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 23165 2009-03-26 12:06 StuDemo.java
----------- --------- ---------- ----- ----
23165 1
- 上一篇:耿祥义--JAVA课程设计
- 下一篇:使用Java编写的绘图板应用程序
相关资源
- java 毕业设计 进销存管理系统 源码
- JSP企业人事管理系统设计(源代码+论
- 实现一个图书管理系统
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 基于Java的酒店管理系统源码(毕业设
- 基于Java的图书管理系统807185
- java 企业销售管理系统
- 基于JSP的学生宿舍管理系统(源码 数
- JSP选课管理系统
- 商店商品管理系统 JAVA写的 有界面
- 基于JSP的校友信息管理系统(添加数
- java做的房产管理系统
- 操作系统作业 (pv,作业管理,等5个
- java access 仓库管理系统 源码
- JSP学生信息管理系统 Mysql数据库
- java sql2008的图书馆管理系统
- jsp基于servlet 图书馆管理系统
- jsp学生成绩管理系统.rar
- java 人事管理系统 课程设计
- 数据库设备管理系统课程设计论文J
- jsp 学生信息管理系统设计与实现
- jsp与SQL Server数据库实现的客户注册登
- 简易教学管理系统(jsp spring struts h
- java sql2000员工管理系统数据库、文档
- java小作业 人事管理系统
- java数据库版学生成绩管理系统
- 学生信息管理系统 JSP MySQL
- 人事信息管理系统 java课程设计
- 学生信息管理系统 JAVA课程设计
评论
共有 条评论