| merhaba arkadaşlar, otel yönetim sistemi yapıyorum da kendi başıma. müşteri ekleme güncelleme silme işlemlerini, oda arama gibi işlemleri hallettim fakat oda uygunluğunu kontrol etmeyi yapamadım. C# ile yapıyorum. yardım edebilecek var mı ? |
| merhaba arkadaşlar, otel yönetim sistemi yapıyorum da kendi başıma. müşteri ekleme güncelleme silme işlemlerini, oda arama gibi işlemleri hallettim fakat oda uygunluğunu kontrol etmeyi yapamadım. C# ile yapıyorum. yardım edebilecek var mı ? |
| merhaba arkadaşlar lg g2 5.0.2 sürümlü telefonum var, kilit ekranındaki saat beni rahatsız ediyor, telefonum rootlu, araştırdığım kadarı ile de bu sürümde kilit ekranında widget özelliği yokmuş bu yüzden de kaldıramıyorum, bildiğiniz program veya root ayarı felan var mı kaldırmak için ? |
|
javada booleanlı methodu mainde testObject ile çağırabiliyorum, voidli methodu nasıl çağırabilirim ? (test etmek için) public void cardPayment() { double payment=150.0; currentMonthlyBalance=80.0; creditLimit=100.0; if(payment>currentMonthlyBalance && payment>creditLimit) System.out.println("The payment denied."); else System.out.println("The payment accepted."); } |
|
Arkadaşlar merhaba, aşağıdaki kodumda 2 tane branch var, sağ ve sol. sağ branchdeki 60ı silmek istiyorum daha sonra da root'un sağ branch'inin solundaki en büyük rakam olan 57yi bulmak istiyorum. nasıl yapabilirim ? #include <iostream> #include <stdlib.h> using namespace std; struct leaf { int number; leaf *left; leaf *right; }; void ListTree(leaf *root) { if(root!=NULL) { cout << root->number << endl; ListTree(root->left); ListTree(root->right); } } leaf *CreateLeaf(int number) { leaf *newleaf; newleaf = (leaf *)malloc(sizeof(leaf)); if(newleaf==NULL) return(NULL); newleaf->number = number; newleaf ->left = NULL; newleaf ->right = NULL; return newleaf; } leaf *FindNode(int number,leaf *root) { leaf *before=NULL; while(root!=NULL) { if(number==root->number) return root; before=root; if(number<root->number) root = root->left; else root = root->right; } return before; } bool AddNode(int number,leaf *root) { leaf *newnode = CreateLeaf(number); if(newnode == NULL) return false; if(root == NULL) return false; leaf *whereto = FindNode(number,root); if(whereto == NULL) return false; if(whereto->number == number) return false; if(number< whereto->number)whereto->left=newnode; else whereto->right=newnode; return true; } int main(void) { leaf *root = CreateLeaf(40); AddNode(40,root); AddNode(20,root); AddNode(60,root); AddNode(10,root); AddNode(30,root); AddNode(50,root); AddNode(70,root); AddNode(42,root); AddNode(55,root); AddNode(65,root); AddNode(73,root); AddNode(52,root); AddNode(57,root); AddNode(66,root); AddNode(56,root); cout << "List of the tree is:\n"; ListTree(root); leaf *myleaf = FindNode(99,root); if(myleaf != NULL) { cout << "FOUND : " << myleaf->number << endl; } system("PAUSE"); return 0; } |
|
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) { } } |
|
https://gist.github.com/anonymous/2439c3bbed36e3c5387c bu kodumda neden int TimeCheckedout = book.date.getTime(); buradaki book'un ve Long.parseLong(this.date.getTime())).toString(); buradaki this'in altında kırmızı hata işareti çıkıyor |
|
package tryng; import java.awt.print.Book; import java.text.DateFormat; import java.util.Date; public class homew { String title; String publisher; long ISBN; String author; Date date; String name; boolean isAvailable; //Constructor public homew(String title, String publisher, long ISBN) { this.title = title; this.publisher = publisher; this.ISBN = ISBN; } public void checkOut(Date date, String name) { if (!isAvailable) { System.out.println("Error, the book has already been taken out"); return; } this.date = date; this.name = name; this.isAvailable = false; } public void TimeLeft() { int TimeMax = (int) (this.date.getTime() + 30000); int TimeCheckedout = book.date.getTime(); System.out.println(TimeMax - TimeCheckedout); } public static String dueDate() { return DateFormat.format("dd/MM/yyyy hh:mm:ss", Long.parseLong(this.date.getTime())).toString(); } } |
|
arkadaşlar bir kütüphane uygulaması için kitap class'ı oluşturuyorum fakat şu adımda takıldım ; yardım lütfen Bir kitap, kütüphaneden kontrol edildiğinde, Tarih ve kitabı kontrol eden üyenin ismi(string) depolanır. Ayrıca bir kitabın uygun olup olmadığını belirten bir flag(boolean) false olarak ayarlanır. Bu 3 alan, kitabın üye tarafından döndürülmesine göre ayarlanacak. tam olarak ne yapacağım burada |
|
Arkadaşlar ödevimi yapmasanız bile en azından anlatabilirsiniz. C++'ım çok iyi fakat javayı bu sene ilk defa alıyorum ve nasıl yapacağımı bilmiyorum Design a book class for a library application based on the description below. Every book has a title (string), an author (String), a publisher (String), and an ISBN number (long). When a book is checked out from the library, the date (Date) and the name of the member (String) that is checking out the book are stored. Also a flag (boolean) indicating whether the book is available is set to false. These 3 fields will be adjusted accordingly when the book is returned by the member. If a member tries to check out an unavailable book, s/he will see an error message. Books borrowed by members are due back at a maximum of 30,000 milliseconds later. At any moment, a librarian can query the amount of time left to the due date of a book. The time left will be printed on the screen in milliseconds. The librarian wants to tell members when a book would be due if it were (not is) borrowed now. Write a static function that returns the String representation of the due date from now. |