arkadaşlar bu benim kodum, main kısmını henüz oluşturuyorum. main kısmında her fonksiyonu en az bir kere nasıl çağırabilirim test etmek için.
package book_Information;
import java.util.Scanner; import java.util.Date;
public class Book_Information { String title; String author; String publisher; long ISBN; String date; boolean elementavailable; String recipient_name;
public Book_Information(String title, String publisher, long ISBN) { setTitle(title); setAuthor(author); setPublisher(publisher); setISBN(ISBN); } public long getISBN() { return ISBN; } public void setISBN(long ISBN) { this.ISBN = ISBN; }
public String getTitle() { return title; } public void setTitle(String title) { this.title = title; }
public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; }
public void setPublisher(String publisher) { this.publisher = publisher; } public String getPublisher() { return publisher; }
public void BookLibrary (String title, String author, String publisher, long ISBN){
}
public void Book_Taker (String recipient_name,String date) { Scanner user_input = new Scanner( System.in ); Date Now = new Date(); System.out.println("The receipt date of this book: " + Now.toString());
System.out.println("Please enter your name"); recipient_name = user_input.next( ); }
public void checking_out_book (String date, String author) { if (!elementavailable) { System.out.println("Sorry! You can't take this book."); return; } this.date = date; this.author = author; this.elementavailable = false;
Date d = new Date(); Date future = new Date(d.getTime()+30000); }
public static void main(String[] args) {
} }
Java bilmiyorum ama main içinde yazdigin class'in bir instance'ini olusturup metodlarini o instance üzerinden cagirabilirsin. Metodlarin icinde gerekli yerlere print koyarak isleyisi konsoldan takip edebilirsin