
正文
java代码学生考勤 java学生考勤管理系统
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
java编写程序根据平时成绩和出勤率计算并返回学生的考试资格
-
#include
int main()
{
float chengji;
int count_90=0;
int sum=0;
int count_stu=0;
while(true)
{
scanf("%g",chengji);
if(chengji=0)
{
sum+=chengji;
count_stu++;
if(chengji=90)
{
count_90++;
}
}
if(chengji0)
{
float pingjun=sum*1./count_stu;
printf("平均分是java代码学生考勤:%g\n90分以上java代码学生考勤的人有%d人",pingjun,count_90);
return 0;
}
}
return 0;
}
相关问答
Q1: 求一个Java简单的学生考勤系统代码
大学生的作业不都该先让你们写个需求分析什么的么,你先写好需求分析然后贴出需求来再找人帮你做。你这么说一个简单的考勤系统谁知道你要用什么做,用不用数据库,用什么数据库,用什么存储引擎。通过什么方式来考勤。兄弟,问问题之前先想好自己的需求。而且写这么多的代码也不是每个看到的都有心情写的,你该先到csdn上看看有没有类似的代码自己回家改改。要是完全不会的话怎么帮也没用对吧。
Q2: Java学生考勤管理,求教
public class Examination {
//考勤
public int attendance(int i) {
int num = 30;
double attendanceRate = new BigDecimal((float)i/num).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
if(attendanceRate0.3) {
return 1;
}
return 0;
}
//成绩
public int results(int i) {
int num = 60;
if(inum) {
return 1;
}
return 0;
}
}
判读一下两个方法返回值java代码学生考勤的和 0就是有资格 1 或者2 都是没资格
Q3: java,添加一个类,显示考勤信息的。
public class Test06 {
static ListStudent_Status list_Student_Status = new ArrayListStudent_Status();
static ListStudent list_Student = new ArrayListStudent();
static ListStatus list_Studus = new ArrayListStatus();
static Scanner scanner = new Scanner(System.in);
public Test06() {
list_Studus.add(new Status("001", "病假"));
list_Studus.add(new Status("002", "产假"));
list_Studus.add(new Status("003", "事假"));
list_Studus.add(new Status("004", "婚假"));
list_Student.add(new Student("001", "张三"));
list_Student.add(new Student("002", "李四"));
list_Student.add(new Student("003", "王五"));
list_Student.add(new Student("004", "刘杰"));
list_Student.add(new Student("005", "陈朋"));
list_Student.add(new Student("006", "赵明明"));
list_Student.add(new Student("007", "罗四海"));
list_Student.add(new Student("008", "谢一刀"));
list_Student_Status.add(new Student_Status("001", list_Student.get(0),
list_Studus.get(0)));
list_Student_Status.add(new Student_Status("002", list_Student.get(1),
list_Studus.get(0)));
list_Student_Status.add(new Student_Status("003", list_Student.get(2),
list_Studus.get(1)));
list_Student_Status.add(new Student_Status("004", list_Student.get(3),
list_Studus.get(0)));
list_Student_Status.add(new Student_Status("005", list_Student.get(4),
list_Studus.get(2)));
list_Student_Status.add(new Student_Status("006", list_Student.get(5),
list_Studus.get(0)));
list_Student_Status.add(new Student_Status("007", list_Student.get(6),
list_Studus.get(3)));
list_Student_Status.add(new Student_Status("008", list_Student.get(7),
list_Studus.get(0)));
}
public static void main(String[] args) {
new Test06();
showHelp();
doMothed();
}
public static void doMothed() {
System.out.println("请选择你要操作的类型 1-按学号查询考勤 2-按考勤态度id杳学生");
System.out.println("请输入...");
int num = scanner.nextInt();
switch (num) {
case 1:
Find_1();
break;
case 2:
Find_2();
break;
default:
showHelp();
break;
}
doMothed();
}
public static void Find_2() {
System.out.println("请输考勤类型代号:");
String ids2 = scanner.next();
ListStudent list_temp = findStudentsByStatusID(ids2);
System.out.println("当前请 " + findByStatusID(ids2).status + " 的人员有:");
for (Student student : list_temp) {
System.out.println(student.getName());
}
}
public static void Find_1() {
System.out.println("请输入学生学号:");
String ids = scanner.next();
ListStudent_Status list_ss = GetByStudentID(ids);
System.out.println("当前学生为: " + FindByid(ids).getName());
for (Student_Status student_Status : list_ss) {
System.out.println("时间: " + student_Status.getDate() + " 姓名: "
+ student_Status.getStudent().getName() + " 事由: "
+ student_Status.getStatus().status);
}
}
public static void showHelp() {
System.out.println(" 学生信息列表");
System.out.println("********************************");
System.out.println("ID 姓名");
for (Student student : list_Student) {
System.out.println(student.getId() + " "
+ student.getName());
}
System.out.println("********************************");
System.out.println("考勤状态表");
System.out.println("********************************");
System.out.println("ID 状态");
for (Status status : list_Studus) {
System.out.println(status.id + " " + status.status);
}
System.out.println("********************************");
}
public static Status findByStatusID(String ids) {
for (Status status : list_Studus) {
if (status.id.equals(ids))
return status;
}
return null;
}
public static Student FindByid(String id) {
for (Student ss : list_Student) {
if (ss.getId().equals(id)) {
return ss;
}
}
return null;
}
// 添加考勤
public void Add_Student_Status(Student_Status ss) {
list_Student_Status.add(ss);
}
// 按考勤类型查人员
public static ListStudent findStudentsByStatusID(String id) {
ListStudent list = new ArrayListStudent();
for (Student_Status ss : list_Student_Status) {
if (ss.getStatus().id.equals(id)) {
list.add(ss.getStudent());
}
}
return list;
}
// 按学号查询考勤
public static ListStudent_Status GetByStudentID(String id) {
Student student = FindByid(id);
return student.getStudent_Status();
}
// 学生对象
class Student {
String id;
String name;
public Student(String id, String name) {
this.name = name;
this.id = id;
}
public String getId() {
return id;
}
public String getName() {
return name;
}
public ListStudent_Status getStudent_Status() {
ListStudent_Status list1 = new ArrayListStudent_Status();
for (Student_Status ss : list_Student_Status) {
if (ss.getStudent().getId().equals(getId())) {
list1.add(ss);
}
}
return list1;
}
}
// 考勤对象
class Status {
String id;
String status;
public Status(String id, String status) {
this.status = status;
this.id = id;
}
}
class Student_Status {
String id;
Date date;
Student student;
Status status;
public Student_Status(String id, Student student, Status status) {
this.id = id;
this.date = new Date();
this.student = student;
this.status = status;
}
public String getId() {
return id;
}
public Date getDate() {
return date;
}
public Student getStudent() {
return student;
}
public Status getStatus() {
return status;
}
}
}
Q4: 求一个java编写的学生考勤系统
可以借助Baidu Hi示意java代码学生考勤我
有时间可能完成java代码学生考勤你所面临java代码学生考勤的任务
差不多java代码学生考勤的要求也可能示意我
求一个java编写的学生考勤**
ES:\\57AB223CC4C693B02C2E26BEFDF2532E
java代码学生考勤的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于java学生考勤管理系统、java代码学生考勤的信息别忘了在本站进行查找喔。







