Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Borrowing class
package bookstore; public class Bookstore { public static void main(String[] args) { } } class Shopping{ private String bookName; private int bookId; private String customerName; private int customerId; private int totalPurchasedBooks; Shopping(){ ++totalPurchasedBooks; } Shopping(String bookn,int bookid, String customern,int customerid){ bookName= bookn; bookId=bookid; customerName=customern; customerId=customerid; ++totalPurchasedBooks; } public String getBookName (){ return bookName; } public int getBookId (){ return bookId; } public String getCustomerName (){ return customerName; } public int getCustomerId (){ return customerId; } } class Borrowing extends Shopping { private Date borrowingDate; private Date returningDate; private int borrowingDuration; public double borrowingPrice; public User book; public User u_ser; public Borrowing() { } public Borrowing(Date borrowingDate, Date returningDate, int borrowingDuration, double borrowingPrice, User book, User u_ser) { this.borrowingDate = borrowingDate; this.returningDate = returningDate; this.borrowingDuration = borrowingDuration; this.borrowingPrice = borrowingPrice; this.book = book; this.u_ser = u_ser; } public Date getBorrowingDate() { return borrowingDate; } public Date getReturningDate() { return returningDate; } public int getBorrowingDuration() { return borrowingDuration; } public double getBorrowingPrice() { return borrowingPrice; } public void setBorrowingDate(Date borrowingDate) { this.borrowingDate = borrowingDate; } public void setReturningDate(Date returningDate) { this.returningDate = returningDate; } public void setBorrowingDuration(int borrowingDuration) { this.borrowingDuration = borrowingDuration; } public void setBorrowingPrice(double borrowingPrice) { this.borrowingPrice = borrowingPrice; } }
run
|
edit
|
history
|
help
0
3.c
Кошачья бойня
// Java Coding Challenge - 08: Reversing a Number using Mathematical Operations
l
// Java Coding Challenge - 08: Reversing a Number using StringBuilder
ab
Roberto02
Ridhiverma
rstring
OBF-7 4