⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 membermanagement.java

📁 俱乐部查询系统
💻 JAVA
字号:
	import java.io.BufferedReader;
	import java.io.InputStreamReader;
	import java.io.IOException;
	
	public class Membermanagement
	{   
	   
		public static void main(String[] args) throws IOException
		{
			Memberinformation myinfor=new Memberinformation();
			while(0==0){
			
			System.out.println("WELCOME TO USE THE FISHER CLUB INFORMATION SYSTEM");
			System.out.println(" ");
			System.out.println("M A I N      M E N U");
			System.out.println("=====================");
			System.out.println(" ");
			System.out.println(" ");
			System.out.println("1. Create New Member Record");
			System.out.println(" ");
			System.out.println("2. View Membership Detail");
			System.out.println(" ");
			System.out.println("3. List All Members");
			System.out.println(" ");
			System.out.println("4. List Members Ager Greater Than ");
			System.out.println(" ");
			System.out.println(" ");
			System.out.println("Enter Your Choice <1, 2, 3or 4>");
			BufferedReader console = new BufferedReader(
				new InputStreamReader(System.in));
				String input= console.readLine();
				int count= Integer.parseInt(input);
				if(count==1)
				{
					
					System.out.println("Please Initial Your ID, Name, Age and Phonenumber");
					System.out.println(" ");
					int ix, ax, px;
					ix=0;
					ax=0;
					px=0;
					String nx="null";
					
					System.out.println("Please Enter Your ID <greater than 122>");
			       	String inputid= console.readLine();
				    ix= Integer.parseInt(inputid);
				    
					System.out.println("Please Enter Your Name");
			       	String inputname= console.readLine();
				    nx=inputname;
				    
					System.out.println("Please Enter Your Age");
			       	String inputage= console.readLine();
				    ax= Integer.parseInt(inputage);
				    
					System.out.println("Please Create Your Phonenumber");
			       	String inputphone= console.readLine();
				    px= Integer.parseInt(inputphone);
				    
					
					myinfor.createmember(ix, nx, ax, px);
				}
				
				if(count==2)
				{
					int checkid=0;
					System.out.println("Please Enter the ID You Want To Check");
			       	String inputcheck= console.readLine();
				    checkid= Integer.parseInt(inputcheck);
				    
					myinfor.listmember(checkid);
					
				
				}
				
				if(count==3)
				{
					int temp=0;
					int checktemp=9;
					System.out.println("If You Want To List All Current Memeber's Information, Type'9'");
			       	String inputtemp= console.readLine();
				    temp= Integer.parseInt(inputtemp);
				    if (temp==checktemp)
				    myinfor.listall();
					
				}
				if(count==4){
					int agex=0;
					
					System.out.println("Please Enter the Age  Base Line");
			       	String inputagex= console.readLine();
				    agex= Integer.parseInt(inputagex);
				    
				    myinfor.filtermember(agex);
					
					
				}
				}	
				
				
	  }			
				
				
	}					
				
    class Memberinformation{
     

	{
	
		id=new int[25];
		name=new String[25] ;
		age=new int[25] ;
		phonenumber=new int[25];
	}
		
	private int[] id={101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,
	121,122,0,0,0};
	private String[] name={"Tom","Joe","Amy","Will","Kent","Jerry","Jason","Mike","Wayne",
	"Lee","Arason","Kelvin","Ralph","Emily","Wany","Jim","Yumi","Andy","Jack","David","Thorpe",
	"Linda","null","null","null"};
	private int[] age={18,21,37,53,76,34,24,56,48,72,18,20,31,35,36,47,49,52,26,65,23,28,0,0,0};
	private int[] phonenumber={92774513,93544533,94532344,96543214,97654345,92345436,97765465,98654353,
	97643456,95546754,96754332,96754322,97658433,96754330,98760542,90633545,90687643,96548705,90676543,
	96765045,96543356,98789765,0,0,0};
	
	public void listmember(int numb)
	{
		int i,mid;
		mid=0;
		for(i=0 ; i<25; i++)
		{
			mid=id[i];
			if(mid==numb)
			System.out.println(id[i]+" "+name[i]+" "+age[i]+" " +phonenumber[i]);
		}
	}
	
	public void listall()
	{
		int k;
		System.out.println(" ID "+" "+" NAME "+" "+" AGE "+" PHONENUMBER ");
	
		for(k=0; k<25; k++)
		System.out.println("  "+id[k]+"    "+name[k]+"    "+age[k]+"    "+phonenumber[k]);
	}
	
	public void filtermember(int memberage)
	{
		System.out.println(" ID"+" "+"NAME "+" "+"AGE "+" "+"PHONENUMBER ");
		int m;
		for(m=0; m<age.length; m++)
		{
			if(age[m]>memberage)
			System.out.println(id[m]+" "+name[m]+" "+age[m]+" "+phonenumber[m]);
			
		}
	}
	
	public void createmember(int newid, String newname, int newage, int newphonenumber)
	{
		int n, text=0,index=0;
		for(n=0; n<25; n++)
		{
			text=id[n];
			if(text==0){
			index=n;
			break;
			}
			
		}
		
	
		id[index]=newid;
		name[index]=newname;
		age[index]=newage;
		phonenumber[index]=newphonenumber;
		
		System.out.println("Your information has been created, Thank you");
		System.out.println(" ID "+" "+"NAME"+" "+"AGE "+" PHONENUMBER ");
		System.out.print(" "+id[index]+"  ");
		System.out.print(name[index]+"  ");
		System.out.print(age[index]+"  ");
		System.out.print(phonenumber[index]);
		System.out.println(" ");
		
		
	
	}
	
	
	}
		
	

	
	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -