need help

hing's Avatar
Newbie Member
hey there guys... am trying to complete my project which is to create a Library System. Was able to create a list to show the books available when they select the book and click a borrow button it can print out the book.

what problem i have now is that when a student click borrow... the value how can i transfer to an array inside the object student.

i am usin a main screen (ms) who is controlling all the functions. been trying and trying on this for very long hopefully there will be those who are able to help me out.

my customer screen would be like this... but how can i add in the array for books borrowed


import javax.swing.*;
class Customer
	private String name;
	private int accNo;
	private String password;
	private double balance;
	private String borrow;
	static int borrowCount=0;
	static int customerCount=0;
	private MainScreen ms;
	Customer(String n, int no, String p, double b)
		JOptionPane.showMessageDialog(null,name +" record created");
	public String setStudentBorrow(String a)
		JOptionPane.showMessageDialog(null,"Book Borrowed");
	public String getStudentBorrow()
	{	return borrow;	}
	/*public String setBorrow(String a)
	public String getBorrow()
	{	for (int i=0;i<5;i++)
			return borrow[i];
	public String getPassword()
	{	return password;	}
	public String getName()
	{	return name;		}
	public int getAccNo()
	{	return accNo;	}
	public double getBalance()
	{	return balance;	}
	public void setName(String n)
	{	name=n;	}
	public void setPassword(String p)
	{	password=p;	}
	public void setBalance(double b)
	{	balance=b;	}
	public void setAccNo(int no)
	{	accNo=no;	}
	public void display()
		//"\nCutomer Number : "+ customerCount+
		"\nName :"+name+
		"\nAccount Number: "+accNo+
		"\nBalance (RM): "+balance,"Customer record",

Last edited by shabbir; 23Oct2006 at 14:46.. Reason: Code formating.
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
You have posted it as an Article under the Article / Source code section. I have moved it to the Queries and Discussion forum.

Duplicate of need help !!! urgent. Thread Closed.