成都创新互联网站制作重庆分公司

java任务管理系统代码,java任务管理器

如何编写Myshopping管理系统java程序代码

import java.util.Scanner;

为博望等地区用户提供了全套网页设计制作服务,及博望网站建设行业解决方案。主营业务为成都网站设计、网站制作、博望网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!

public class AddCustomer{

public static void main(String[] args){

System.out.printIn("MyShopping管理系统 客户信息管理 添加客户信息\n");

int custNo; //会员号

int birthday; //会员生日

int points = 0; //会员积分

Scanner input=new Scanner(System.in);

for(int i=0;i3;i++){ //循环录入会员信息

System.out.printIn("请输入会员号(4位整数):");

custNo = input.nextInt();

System.out.printIn("请输入会员生日(月\日用两位整数表示):");

custNo = input.next();

System.out.printIn("请输入会员积分:");

custNo = input.nextInt();

if(custNo1000||custNo9999){ //会员号无效则跳出

System.out.printIn("客户号"+custNo+"是无效会员号!");

System.out.printIn("录入信息失败\n");

contiune;

}

System.out.printIn("您录入的会员信息是:");

System.out.printIn(custNo+" "+birthday+" "+points+ "\n");

}

System.out.printIn("程序结束!");

}

}

求用Java编写的学生成绩管理系统的完整代码,要能运行的

以下方法实现了用户界面登陆

import java.awt.*;

import java.awt.event.*;

public class DengLuJieMian extends Frame implements ActionListener

{

Label username=new Label("用户名:");//使用文本创建一个用户名标签

TextField t1=new TextField();//创建一个文本框对象

Label password=new Label("密码:");//创建一个密码标签

TextField t2=new TextField();

Button b1=new Button("登陆");//创建登陆按钮

Button b2=new Button("取消");//创建取消按钮

public DengLuJieMian()

{

this.setTitle("学生信息管理系统");//设置窗口标题

this.setLayout(null);//设置窗口布局管理器

username.setBounds(50,40,60,20);//设置姓名标签的初始位置

this.add(username);// 将姓名标签组件添加到容器

t1.setBounds(120,40,80,20);// 设置文本框的初始位置

this.add(t1);// 将文本框组件添加到容器

password.setBounds(50,100,60,20);//密码标签的初始位置

this.add(password);//将密码标签组件添加到容器

t2.setBounds(120,100,80,20);//设置密码标签的初始位置

this.add(t2);//将密码标签组件添加到容器

b1.setBounds(50,150,60,20);//设置登陆按钮的初始位置

this.add(b1);//将登陆按钮组件添加到容器

b2.setBounds(120,150,60,20);//设置取消按钮的初始位置

this.add(b2);// 将取消按钮组件添加到容器

b1.addActionListener(this);//给登陆按钮添加监听器

b2.addActionListener(this);// 给取消按钮添加监听器

this.setVisible(true);//设置窗口的可见性

this.setSize(300,200);//设置窗口的大小

addWindowListener(new WindowAdapter()

{

public void windowClosing(WindowEvent e)

{

System.exit(0);

}

});//通过内部类重写关闭窗体的方法

}

public void actionPerformed(ActionEvent e)

{

if(e.getSource()==b1)//处理登陆事件

{

String name=t1.getText();

String pass=t2.getText();

if(name!=nullpass.equals("000123"))//判断语句

{

new StudentJieMian();

}

}

}

public static void main(String args[])//主函数

{

new DengLuJieMian();

}

}

以下方法实现了学生界面设计

import java.awt.*;

import java.awt.event.*;

class StudentJieMian extends Frame implements ActionListener

{

MenuBar m=new MenuBar();//创建菜单栏

Menu m1=new Menu("信息");//创建菜单“信息”

MenuItem m11=new MenuItem("插入");//创建“插入”的菜单项

MenuItem m12=new MenuItem("查询");

Menu m2=new Menu("成绩");//创建菜单“成绩”

MenuItem m21=new MenuItem("查询");

public StudentJieMian()

{

this.setTitle("学生界面");//设置窗口标题

this.setLayout(new CardLayout());//设置窗口布局管理器

this.setMenuBar(m);//将菜单栏组件添加到容器

m.add(m1);//将信息菜单放入菜单栏

m.add(m2);

m1.add(m11);//将“插入”菜单项添加到“信息”菜单

m1.add(m12); //将“查询”菜单项添加到“信息”菜单

m2.add(m21); //将“查询”菜单项添加到“成绩”菜单

m11.addActionListener(this); //给“插入”菜单项添加监听器

m12.addActionListener(this); //给“查询”菜单项添加监听器

m21.addActionListener(this); //给“查询”菜单项添加监听器

this.setVisible(true); //设置窗口的可见性

this.setSize(300,200); //设置窗口的大小

addWindowListener(new WindowAdapter()

{

public void windowClosing(WindowEvent e)

{

System.exit(0);//关闭窗口

}

});

}

public void actionPerformed(ActionEvent e)

{

if(e.getSource()==m11) //处理“添加信息”事件

{

new AddStudent();

}

if(e.getSource()==m12) //处理“查询信息”事件

{

new SelectStudent();

}

if(e.getSource()==m21) //处理“查询成绩”事件

{

new ChengJiStudent();

}

}

public static void main(String args[])

{ new StudentJieMian(); //创建一个对象 }

怎么用Java编写任务管理器

java不适合做任务管理器,因为java跨平台,所以缺少这种系统级的东西。

如果要做,要使用jni调用系统接口。这样还不如换其他开发语言。例如c或者c#

简单的JAVA学生管理系统代码···

lListStudent students = new ArrayListStudent();

BufferedReader br = new BufferedReader(new FileReader("D:\student.txt"));

String tmpStr = br.readLine();

while(tmpStr != null){

int firstIndex = tmpStr.indexOf(" ");

int secondIndex = tmpStr.indexOf(" ",firstIndex + 1);

int thirdIndex = tmpStr.indexOf(" ", secondIndex + 1);

int forthIndex = tmpStr.indexOf(" ", thirdIndex + 1);

Integer stuId = Integer.parseInt(tmpStr.substring(0,firstIndex));

String stuName = tmpStr.substring(firstIndex + 1,secondIndex);

Integer stuYW = Integer.parseInt(tmpStr.substring(secondIndex + 1,thirdIndex));

Integer stuSX = Integer.parseInt(tmpStr.substring(thirdIndex + 1,forthIndex));

Integer stuYY = Integer.parseInt(tmpStr.substring(forthIndex + 1));

Student student = new Student();

student.setStuId(stuId);

student.setStuName(stuName);

student.setStuYW(stuYW);

student.setStuSX(stuSX);

student.setStuYY(stuYY);

students.add(student);

tmpStr.readLine();

}

//创建一个学生实体类 封装stuId stuName stuYW stuSx stuYY 这5个属性。。。

//已经帮你把数据拆分出来 并以Student 对象的形式放入集合中了 接下来 给分吧 哇咔咔

一个java管理系统多少行代码

1,java规范中一般不建议一个java类中超过500行

2,一行的长度不超过200个

3,按照规定格式将代码格式化

需要完整代码,谢谢大家!需要Java的学生管理系统,具体的在下面的说明问题,有需要要求。按着要求来就行

public class Course {

private String name;

private float score;

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public float getScore() {

return score;

}

public void setScore(float score) {

this.score = score;

}

public Course(String name, float score) {

this.name = name;

this.score = score;

}

public String toString() {

return this.name + ":" + this.score;

}

}

public class Student {

private long id;

private String name;

private int age;

private boolean sex;

public String toString() {

String sex = "女";

if (this.sex == true) {

sex = "男";

}

return String.format("姓名:%s,性别:%s,联系电话:%s,课程信息:%s,课程信息:%s", this.name, sex, this.phone, this.subject.toString());

}

public long getId() {

return id;

}

public void setId(long id) {

this.id = id;

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public int getAge() {

return age;

}

public void setAge(int age) {

this.age = age;

}

public boolean isSex() {

return sex;

}

public void setSex(boolean sex) {

this.sex = sex;

}

public String getPhone() {

return phone;

}

public void setPhone(String phone) {

this.phone = phone;

}

public Course[] getSubject() {

return subject;

}

public void setSubject(Course[] subject) {

this.subject = subject;

}

private String phone;

private Course[] subject;

public Student(long i, String n, int a, boolean s, String p) {

this.id = i;

this.name = n;

this.age = a;

this.sex = s;

this.phone = p;

}

}

import java.util.ArrayList;

public class Cmanage {

private ArrayListStudent students;

//插入

public void addStudent(Student student) {

students.add(student);

}

//删除

public void delStudent(Student student) {

students.remove(student);

}

//查询

public void queryStudent() {

System.out.printf("一共有%d个学生", students.size());

for (Student student : students) {

System.out.println(student.toString());

}

}

//修改

public void updateStudent(long i, String n, int a, boolean s, String p)

{

//以姓名做为唯一标识

for(int j=0;jstudents.size();j++)

{

if (students.get(j).getName().equals(n))

{

students.get(j).setId(i);

students.get(j).setAge(a);

students.get(j).setSex(s);

students.get(j).setPhone(p);

}

}

}

}


本文名称:java任务管理系统代码,java任务管理器
标题来源:http://cxhlcq.com/article/hddihj.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部