متيكو المدير والمشرف
المدير العام الجنس : عدد المساهمات : 590 تاريخ الميلاد : 02/11/1989 تاريخ التسجيل : 28/08/2009 العمر : 35 الموقع : www.matti-king.blogspot.com العمل/الترفيه : يشرف عالمنتدى ويدرس المزاج : تعبان | موضوع: the java library الجمعة مايو 27, 2011 2:22 pm | |
| package library; import java.util.Date;
public class Book { private String isbn; private String title; private String type; private String author; private int edition; private Date year_pubilsh; private Date Date_borrowed;
public Book (String isbn , String title ,String type ,String author , int i, Date year_pubilsh , Date Date_borrowed) { this.setIsbn(isbn); this.setTitle(title); this.setType(type); this.setAuthor(author); this.setEdition(i); this.setYear_pubilsh(year_pubilsh); this.setDate_borrowed(Date_borrowed); }
public Book(String title2, String auther, String type2, String edition2, String year_pubilsh2, String date_borrowed2) { // TODO Auto-generated constructor stub }
public void setIsbn(String isbn) { this.isbn = isbn; } public String getIsbn() { return isbn; } public void setTitle(String title) { this.title = title; } public String getTitle() { return title; }
public void setType(String type) { this.type = type; } public String getType() { return type; } public void setAuthor(String author) { this.author = author; } public String getAuthor() { return author; }
public void setEdition(int i) { this.edition = i; } public int getEdition() { return edition; } public void setYear_pubilsh(Date year_pubilsh) { this.year_pubilsh = year_pubilsh; } public Date getYear_pubilsh() { return year_pubilsh; } public void setDate_borrowed(Date date_borrowed) { Date_borrowed = date_borrowed; } public Date getDate_borrowed() { return Date_borrowed; }
public static void displayAllBooksInfo(Book[] myBooks) { for (Book book : myBooks) { System.out.println("ISBN:"+book.getIsbn()+" "+ "Title:"+book.getTitle()+" "+ "type:"+book.getType()+" "+ "Auther:"+book.getAuthor()+" "+ "Edition:"+book.getEdition()+" "+ "Year of publish:"+book.getYear_pubilsh()+" "+ "Date of Borrow:"+book.getDate_borrowed()+" "); }
}
}
package library; import java.util.*; public class customer { private String firstName; private String lastName; private Date birthDate; private int phone_number; public customer(String firstName, String lastName, Date birthday,int phone_number) { this.setFirstName(firstName); this.setLastName(lastName); this.setBirthDate(birthday); this.setPhone_number(phone_number); }
public void setFirstName(String firstName) { this.firstName = firstName; } public String getFirstName() { return firstName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getLastName() { return lastName; } public void setBirthDate(Date birthDate) { this.birthDate = birthDate; } public Date getBirthDate() { return birthDate; }
public void setPhone_number(int phone_number) { this.phone_number = phone_number; } public int getPhone_number() { return phone_number; } public static void displayAllMembersInfo(customer[] mycustomer) { for (customer customer : mycustomer) { System.out.println("firstName:"+customer.getFirstName()+" "+ "LastName:"+customer.getLastName()+" "+ "birthday:"+customer.getBirthDate()+" "+ "Phone_number:"+customer.getPhone_number()+" "); } }
}
package library;
public class Magazine {
private String title; private String userNumber; public Magazine(String title, String userNumber) { this.setTitle(title); this.setUserNumber(userNumber); } public void setTitle(String title) { this.title = title; } public String getTitle() { return title; } public void setUserNumber(String userNumber) { this.userNumber = userNumber; } public String getUserNumber() { return userNumber; }
public static void displayAllMagazineInfo(Magazine[] myMagazine) { for (Magazine magazine:myMagazine) { System.out.println("Title:"+magazine.getTitle()+" "+ "UserNumber:"+magazine.getUserNumber()+" "); } }
}
package library; import java.util.Date; public class Movie { private String Name; private String Genre; private String Director; private String Writer; private String Producer; private String Language; private String Country; private Date Year_of_produce;
public Movie() { } public Movie(String Name, String Genre, String Director, String Writer,String Producer, String Language,String Country, Date Year_of_produce) { this.Name=Name; this.Genre=Genre; this.Director=Director; this.Writer=Writer; this.Producer=Producer; this.Language=Language; this.Country=Country; this.Year_of_produce=Year_of_produce; } public void setName(String name) { Name = name; } public String getName() { return Name; }
public void setGenre(String genre) { Genre = genre; } public String getGenre() { return Genre; } public void setDirector(String director) { Director = director; } public String getDirector() { return Director; } public void setWriter(String writer) { Writer = writer; } public String getWriter() { return Writer; } public void setProducer(String producer) { Producer = producer; } public String getProducer() { return Producer; } public void setLanguage(String language) { Language = language; } public String getLanguage() { return Language; } public void setCountry(String country) { Country = country; } public String getCountry() { return Country; } public void setYear_of_produce(Date year_of_produce) { Year_of_produce = year_of_produce; } public Date getYear_of_produce() { return Year_of_produce; } public static void displayAllMovieInfo(Movie[] myMovie) { for (Movie movie : myMovie) { System.out.println("Name:"+movie.getName()+" "+ "Genre:"+movie.getGenre()+" "+ "Director:"+movie.getDirector()+" "+ "Writer:"+movie.getWriter()+" "+ "Producer:"+movie.getProducer()+" "+ "Language:"+movie.getLanguage()+" "+ "Country:"+movie.getCountry()+" "+ "Year_of_produce:"+movie.getYear_of_produce()+""); }
}
}
package library; public class Story { private static String title; private static String userNumber; public Story() { } public Story(String title, String userNumber) { this.setTitle(title); this.setUserNumber(userNumber); }
public void setTitle(String title) { Story.title = title; }
public static String getTitle() { return title; }
public void setUserNumber(String userNumber) { Story.userNumber = userNumber; }
public static String getUserNumber() { return userNumber; }
@SuppressWarnings("unused") public static void displayAllStoryInfo(Story[] myStory) { for (Story story : myStory) { System.out.println("Title:"+Story.getTitle()+" "+ "UserNumber:"+Story.getUserNumber()+" "); } }
}
| |
|