java 不同类数据的传递_java 数据在不同类之间的传递

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

mgr.setData(mgr.nameDvd, mgr.state, mgr.customer, mgr.custDvd, mgr.time);

/*创建DVDctm对象,加载数据*/

DVDctm ctm=new DVDctm();

ctm.setData(ctm.nameDvd, ctm.state, ctm.customer, ctm.custDvd, ctm.time, ctm.pswCust);

MainMenu mm=new MainMenu();

mm.mainMenu();

}

}

//主菜单

import java.util.Scanner;

public class MainMenu {

String[] nameDvd=new String[50];             //储存DVD名称

int[] state=new int[50];                 //储存DVD状态

String[][] time=new String[50][50];         //借出DVD时间

String[] customer=new String[50];         //储存用户代号

String[] pswCust=new String[50];             //储存用户密码

String[][] custDvd=new String[50][50];     //储存用户dvd信息

public void setData(String[] nameDvd,int[] state,String[] customer,String[][] custDvd,String[][] time,String[] pswCust){

this.nameDvd=nameDvd;

this.state=state;

this.customer=customer;

this.custDvd=custDvd;

this.time=time;

this.pswCust=pswCust;

}

/**

* 创建Data对象

*/

Data data=new Data();

/**

* 初始化数据

*/

public void setData(){

data.initial();

}

/**

* 系统登录菜单

*/

public void mainMenu(){

/*创建DVDMgr、DVDctm对象*/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值