Advertisement

简单的学生管理系统(Java)----用户信息

阅读量:

基于ArrayList与HashSet的学生信息管理系统实现

注:学生id必须是int数据。且是从1开始顺序添加,否则删除时会报错。此为一个小bug,有待改进。

代码如下:

Student类定义与结构

复制代码
 package com.briup.login;

    
  
    
 public class Student {
    
 	private int id;
    
 	private String name;
    
 	private int age;
    
 	private double source;
    
  
    
 	public Student() {
    
 		super();
    
 	}
    
  
    
 	public Student(int id, String name, int age, double source) {
    
 		super();
    
 		this.id = id;
    
 		this.name = name;
    
 		this.age = age;
    
 		this.source = source;
    
 	}
    
  
    
 	public int getId()

全部评论 (0)

还没有任何评论哟~