Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Book {
- //מאפייני כל הספרים
- private String name;
- private double price;
- // פעולה בונה
- public Book(String name, double price){
- this.name = name;
- this.price = price;
- }
- //פעולה מאחזרת של שם של הספר
- public String getname(){
- return this.name;
- }
- //פעולה מאחזרת של מחיר הספר
- public double getprice(){
- return this.price;
- }
- //פעולה מעדכנת של שם הספר
- public void setname(String name){
- this.name = name;
- }
- //פעולה מעדכנת של מחיר הספר
- public void setprice(double price){
- this.price = price;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement